cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Cain" <...@enetsouth.com>
Subject RE: XSP/XSL
Date Thu, 06 Jul 2000 05:16:39 GMT
Rogerio Lacerda,

> How can I make a XSP file, where the XSL file is dynamic ???

This is done by dynamically creating PIs:

<xsp:pi target="cocoon-process">type="xslt"</xsp:pi>
<xsp:pi target="xml-stylesheet">
    href="stylesheets/<xsp:expr>stylesheetName</xsp:expr>.xsl"
    type="text/xsl"
</xsp:pi>

You will have to have the PIs inside your root document element or else you
won't be able to dynamically set your stylesheetName variable. It would look
something like this:

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>

<xsp:page ...>
    <document>
        <xsp:logic>
            ...determine stylesheet here...
        </xsp:logic>

        ...include stylesheet PIs here...

        ...rest of document...
    </document>
</xsp:page>

------------------
Jay Cain
Lead Developer
eNetSouth, LLC
jay@enetsouth.com


Mime
View raw message