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:[EMAIL PROTECTED]]
Verzonden: dinsdag 9 juli 2002 19:56
Aan: [EMAIL PROTECTED]
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>



---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to