You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Rogerio Lacerda <ro...@newmail.net> on 2000/07/05 15:53:41 UTC
XSP/XSL
How can I make a XSP file, where the XSL file is dynamic ???
Anybody knows ?
Regards,
Roger
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
==========> <?xml-stylesheet href="lista_nomes.xsl" type="text/xsl"?>
RE: XSP/XSL
Posted by Jay Cain <ja...@enetsouth.com>.
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