cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Habib Kaci <>
Subject RE: Specify the stylesheet location dynamically
Date Wed, 06 Dec 2006 07:53:59 GMT
Thank you for response,

	I want to specify that in xsp page.

	I'm migrating a large number of cocoon 1.7 xsp pages to cocoon 2. In
cocoon 1, the xslt transformation is specified within the xsp pages

	So, If there any way to do the same think in C2 xsp pages, that will
avoid to writing a complexe sitemap.

Thank you 

-----Message d'origine-----
De : Steven D. Majewski []
Envoyé : mardi 5 décembre 2006 20:02
À :
Objet : Re: Specify the stylesheet location dynamically

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