cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhang Newman-r53609 <Newman.Zh...@motorola.com>
Subject Dynamically generate XSL to transform XSP
Date Thu, 10 Apr 2003 13:36:09 GMT
Hello,everyone
 
What do you think about the 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 another webpage,then
assume v_type = "DMTL" , v_report = "Report1"
 
Then,how to match item with specialxsl.xml, fetch value of url to put in {target}.
 
As result,with match XSL file to transform "getdata.xsp" 
So, "xslfile1.xsl" will be as transform.
 
How can do it?
 
Hope I was able to explain myself, Any sounds is good for me.
Newman

Mime
View raw message