cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Dalquist" <ebdal...@mtu.edu>
Subject Re: QUESTION: Dynamic XSL
Date Thu, 11 Jul 2002 15:22:27 GMT
Thanks for the tip. It works great!

-Eric Dalquist

----- Original Message -----
From: "Koen Pellegrims" <koen.pellegrims@pandora.be>
To: <cocoon-users@xml.apache.org>
Sent: Tuesday, July 09, 2002 2:21 PM
Subject: RE: QUESTION: Dynamic XSL


> Your idea is not as far-fetched as you might think (I think there is a
> sample with dynamically generated content *and* stylesheets).
> You will, however, need to use the cocoon:/ protocol in your sitemap to
> allow your .xsl to be machted by the appropriate pipeline:
>
> <map:match pattern="*.html">
> <map:generate type="serverpages" src="logic/pages/{1}.xsp"/>
> <map:transform src="cocoon:/{1}.xsl"/>
> <map:generate type="html"/>
> </map:match>
>
> <map:match pattern="*.xsl">
> <map:generate type="serverpages" src="logic/stylesheets/{1}.xsp"/>
> <map:serialize type="xml"/>
> </map:match>
>
> This example should do what you are looking for. The cocoon:/ protocol
tries
> to find an appropriate match in the
> current sitemap.
>
> Koen.
>
> -----Oorspronkelijk bericht-----
> Van: Eric Dalquist [mailto:ebdalqui@mtu.edu]
> Verzonden: dinsdag 9 juli 2002 19:56
> Aan: cocoon-users@xml.apache.org
> Onderwerp: QUESTION: Dynamic XSL
>
>
> I was wondering if there is a way to generate an XSL document to be used
in
> another transformation. Here is an theoretical pipeline that might
> illustrate my question a bit better:
>
> <!--
> Generate the dynamic page with it's specific style sheet and then apply
the
> site's format
> -->
>             <map:match pattern="*.xsp">
>                 <map:generate type="serverpages" src="logic/{1}.xsp"/>
>                 <map:transform src="site_format.xsl"/>
>                 <map:transform src="stylesheets/{1}.xsl"/>
>                 <map:serialize/>
>             </map:match>
>
> <!--
> Generate the site format stylesheet so navigation data along with look and
> feel data can be stored in a database
> but only called from one spot.
> -->
>             <map:match pattern="site_format.xsl">
>                 <map:generate type="serverpages"
> src="logic/site_format.xsp"/>
>                 <map:serialize/>
>             </map:match>
>
> I hope this makes sence to someone and they have some suggestions.
>
> -Eric Dalquist
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message