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
(<xsp:pi>).

        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 [mailto:[EMAIL PROTECTED]
Envoyé : mardi 5 décembre 2006 20:02
À : users@cocoon.apache.org
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

        published/XYZ/ABC.document

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



<!-- STYLED CONTENT -->
         <!--  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"  
value="{request:contextPath}"/>
             <map:parameter name="who" value="{1}"/>
           </map:transform>
           <map:serialize type="html"/>
         </map:match>


In other cases, a stylesheet is passed as a request parameter.
I imagine with flowscript you can do pretty much any arbitrary  
processing
  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to