You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sebastien Koechlin <sk...@ivision.fr> on 2000/09/07 13:25:00 UTC
Re: Cocoon's issues with multiple stylesheets / multiple input documents
Thorbjørn Ravn Andersen wrote:
>
> > But Cocoon offers to do a thing like this:
>
> A hack to insert a PI at the top. Interesting.
cocoon.properties:
==================
browser.0 = html=^html
browser.1 = xml=^xml
browser.2 = text=^text
browser.3 = pdf=^pdf
...
In your XML/XSP:
================
<?xml-stylesheet href="ss-html.xsl" type="text/xsl"?>
<?xml-stylesheet href="ss-xml.xsl" type="text/xsl" media="xml"?>
<?xml-stylesheet href="ss-pdf.xsl" type="text/xsl" media="pdf"?>
And just call:
==============
http://my.host/my/dir/file.xml?user-Agent=^xml
http://my.host/my/dir/file.xml?user-Agent=^pdf
Character '^' is just here to make no confusion with any
user-agent value.
I have an 'display XML as HTML' stylesheet that allow me
to write logic before having any stylesheet. Really useful
for debugging. But not as good as writing a
XMLasHTMLFormatter.
--
Sébastien Koechlin