You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zhang Newman-r53609 <Ne...@motorola.com> on 2003/04/10 10:31:53 UTC

How to get transform parameter

Hello,
 
As developer, I need to created a website with Cocoon. Now I meet some questions for this . May I ask some questions to you.
Let's show you at below.
========================
file 1:(Sitemap.xmap)
...
<map:match pattern="getdata.html">
   <map:generate src="getdata.xsp" type="serverpages"/>
   <map:transform src="{target}" />
   <map:serialize type="html" />
</map:match>
 
file 2:(specialxsl.xml)
<TypeList>
   <Type name="EMTL">
     <Report1>
       <XSL url="xslfile1.xsl"/>
     </Report1>
     <Report2>
       <XSL url="xslfile2.xsl"/>
     </Report2>    
    </Type>
   <Type name="DMTL">
     <Report1>
       <XSL url="xslfile1.xsl"/>
     </Report1>
     <Report2>
       <XSL url="xslfile2.xsl"/>
     </Report2>    
    </Type>
     ...
 </TypeList>
 
Now,I have a XSP program as getxsl.xsp that to request parameter from above XSP program .such as:
String v_type = request.parameter(Type);
String v_report = request.parameter(Report);
 
Then,match item with specialxsl.xml, select url to put in {target}.
 
As result,with match XSL file to transform "getdata.xsp" 
 
How can do it?
 
Any sounds is good. Thanks very much.
Newman