cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: changing PI at runtime
Date Wed, 26 Jul 2000 18:15:30 GMT
You're on the right track. That's basically what I do to generate dynamic 
PIs.


<tcurdt@dff.st> wrote:
>I'm trying to change the PI at runtime
>or 'how to select a xsl in xsp'
>
>Right now I have the chain
>
>XML->XSP->XSL
>
>In the XSP I want to decide by e.g. paramter (like data.xml?page=1
>or data.xml?xsl=page1.xsl&media=html) which XSL file I need to take.
>
>I looked at the slide examples but doesn't like the approach
>since the definition what is inside a slide happens in the xml.
>I'd like to do this in a XSL.
>
>Therefor I need to change the PIs. I don't know where
>I can put the code to do that. I didn't came much
>further than that:
>
>XSP:
>  <xsl:template match="page">
>
>   <xsl:variable name="view">html.xsl</xsl:variable>
>
>   <xsl:processing-instruction name="cocoon-process">
>     type="xsp"</xsl:processing-instruction>
>   <xsl:processing-instruction name="cocoon-process">
>     type="xslt"</xsl:processing-instruction>
>   <xsl:processing-instruction name="xml-stylesheet">
>     href="../order1.xsl/<xsl:value-of select="$view"/>"
>     type="text/xsl"
>   </xsl:processing-instruction>
>
>   <xsp:page language="java" 
>xmlns:xsp="http://www.apache.org/1999/XSP/Core">
>   ...
>
>Hope anyone can give me a hint


--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message