cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven D. Majewski" <>
Subject Re: Specify the stylesheet location dynamically
Date Tue, 05 Dec 2006 19:02:20 GMT

On Dec 5, 2006, at 1:22 PM, Habib Kaci wrote:

> Hi,
>         I have a specic need to specify the stylesheet doing the  
> xslt transformation at runtime.
>         Can I specify this within the XSP (without writing action).
> Thank you,

Yes -- you can specify the transform "at runtime" .
The question is: how do you intend to specify it ?

For an example, I use the following in my sitemap, so that


styles  published/XYZ/ABC.xml  thru the xsl/document.xsl stylesheet.

         <!--  For the rest of the files, we use the file extension  
as a stylesheet -->
         <map:match pattern="published/*/*.*">
           <map:generate src="published/{1}/{2}.xml"/>
           <map:transform src="xsl/{3}.xsl">
             <map:parameter name="contextPath"  
             <map:parameter name="who" value="{1}"/>
           <map:serialize type="html"/>

In other cases, a stylesheet is passed as a request parameter.
I imagine with flowscript you can do pretty much any arbitrary  
  to define parameters before calliing another pipeline. ( And IMHO,  
writing flowscripts
  is likely easier than writing actions. ) Like perhaps if you wanted  
to lookup a
user preference to determine a stylesheet.

( Did I understand the question correctly ? )

-- Steve Majewski / UVA Alderman Library

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message