cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Wójcik <wojc...@okno.pw.edu.pl>
Subject How to check request parameter exist (in sitemap)?
Date Fri, 23 Apr 2004 08:10:40 GMT
Hi

I'm using request parameter selector to maka a choice of correct xsl
tranformation.
This pipeline works correctly, but additionaly I'd like to check if the
request parameter exists.
 How can I do it? (I'd like to do the same transform when parameter doesn't
exist, and is equal "0")

<map:pipeline>
      <map:match pattern="dir">
        .........
        <map:select type="request-parameter">
          <map:parameter name="parameter-name" value="id"/>

        <map:when test="????????????">
             ???????? transformation_when_parameter_not_exists ?????????
           </map:transform>
        </map:when>

     <map:when test="0">
            <map:transform src="oprogramowanie/styles/licencje2lista.xsl">
            </map:transform>
          </map:when>
          <map:otherwise>
            <map:transform type="xslt"
src="oprogramowanie/styles/licencjeSzczegoly.xsl">
              <map:parameter name="id"  value="{request-param:id}"/>
            </map:transform>
          </map:otherwise>
        </map:select>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>

Thanks for help



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message