cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yatin Shah <nos...@kripa.com>
Subject [FLOW] How to access flow parms in the site map?
Date Tue, 27 Jan 2004 16:34:37 GMT
How does one access the flowscript objects from a site map?

I like to use a selector along with flowscript object to construct site 
map pipeline flow.

For example, in the following pipeline I like to replace the 
request-parameter selector
with a selector utilizing a flowscript object for parameter!
Are there any other solutions?

  <map:pipeline internal-only="true">

     <map:match pattern="XMLcollector" >
        <map:generate type="jx" src="cocoon:/custom-jxt/XMLcollector.jxt"/>

        <!-- Currently the request parameter VER=POP|PRT|PDF|XML
               request-parameter selector allows to select appropriate 
transformers.
               Is it possible to use a flow object instead of a request 
parameter ?
           -->
        <map:select type="request-parameter">
           <map:parameter name="parameter-name" value="VER"/>

           <map:when test="POP" >
              <map:transform src="cocoon:/custom-xsl/popup_xml2html.xsl">
                 <map:parameter name="use-request-parameters" 
value="true"/>
              <map:parameter name="queryString" 
value="{request:queryString}"/>
              <map:parameter name="requestURI" 
value="{request:requestURI}"/>
              </map:transform>
              <map:serialize/>
           </map:when>

           <map:when test="PRT" >
              <map:transform src="cocoon:/custom-xsl/printer_xml2html.xsl">
             <map:parameter name="use-request-parameters" value="true"/>
             <map:parameter name="queryString" 
value="{request:queryString}"/>
             <map:parameter name="requestURI" 
value="{request:requestURI}"/>
              </map:transform>
              <map:serialize/>
           </map:when>

           <map:when test="PDF" >
               <map:transform src="cocoon:/custom-xsl/xml2fo.xsl">
             <map:parameter name="use-request-parameters" value="true"/>
             <map:parameter name="queryString" 
value="{request:queryString}"/>
             <map:parameter name="requestURI" 
value="{request:requestURI}"/>
              </map:transform>
              <map:serialize type="fo2pdf"/>
           </map:when>

           <map:when test="XML" >
             <!-- Views can be used for pure xml streaming -->
              <map:serialize type="xml"/>
           </map:when>

           <map:otherwise>
              <!-- map:when test="normal" -->
              <map:transform src="cocoon:/custom-xsl/normal_xml2html.xsl">
             <map:parameter name="use-request-parameters" value="true"/>
             <map:parameter name="queryString" 
value="{request:queryString}"/>
             <map:parameter name="requestURI" 
value="{request:requestURI}"/>
             <map:parameter name="serverName" 
value="{request:serverName}"/>
              </map:transform>
              <map:serialize/>
           </map:otherwise>
        </map:select>

     </map:match>



TIA
-Yatin

-- 
Yatin Shah, President                       mailto:ygs@kripa.com
Kripa Inc.                                  http://www.kripa.com
Dayton, New Jersey USA                      phone:  732.329.8303
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Developers of real time event driven distributed DB applications




Mime
View raw message