You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Arnaud Sahuguet <sa...@gradient.cis.upenn.edu> on 2000/04/17 03:12:02 UTC

generating various output formats from the same XML file

Hi,

I would like to be able to generate some different output for a given
XML file.
Cocoon already offers such a feature for browser-based content (a
different content is sent to Netscape, Lynx, etc.).

I would like for instance to have a urls like:
http://a.b.c/file.xml?PDF
http://a.b.c/file.xml?HTML
http://a.b.c/file.xml?TXT

and get a different result.

I have not found an obvious to do it.
I have tried to use XSP to take the XML document, add some information
(target format) and pass it to the stylesheet engien, but so far it
still does not work.

Suggestions are welcome.

Regards,

Arnaud

Re: generating various output formats from the same XML file

Posted by Marcello Granata <mg...@matrix.it>.
I think you should use cocoon formatters. You could put a format variable in
the URL (http://a.b.c./file.xml?my_variable=text/wml) and substitute its
value in the cocoon pi.
i.e. <?cocoon-format type="%my_variable"?>

I'm not sure it  works :) but you could try!

ciao

----- Original Message -----
From: Arnaud Sahuguet <sa...@gradient.cis.upenn.edu>
To: <co...@xml.apache.org>
Sent: Monday, 17 April, 2000 03:12
Subject: generating various output formats from the same XML file


> Hi,
>
> I would like to be able to generate some different output for a given
> XML file.
> Cocoon already offers such a feature for browser-based content (a
> different content is sent to Netscape, Lynx, etc.).
>
> I would like for instance to have a urls like:
> http://a.b.c/file.xml?PDF
> http://a.b.c/file.xml?HTML
> http://a.b.c/file.xml?TXT
>
> and get a different result.
>
> I have not found an obvious to do it.
> I have tried to use XSP to take the XML document, add some information
> (target format) and pass it to the stylesheet engien, but so far it
> still does not work.
>
> Suggestions are welcome.
>
> Regards,
>
> Arnaud
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>