cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Ståldal <d96-...@d.kth.se>
Subject Re: Transform an XML document to several formats
Date Fri, 10 Mar 2000 14:46:58 GMT
On Fri, 10 Mar 2000, Ulrich Mayring wrote:

> Quite easy, make document.xml an XML document that calls the
> PDF-stylesheet and document.html an XML document that calls the HTML
> stylesheet.

You mean that I should maintain two copies of the same XML document.
I don't like that solution.

> However, I'm not sure if this way of setting things up is good.

It's not.

> What I
> would do is have a central document.xml and make the distinction 
> between
> PDF and HTML in the stylesheet it calls. How to do that exactly depends
> on your site organisation. For example, if you have an HTML page with a
> button "This HTML page as PDF", then in the stylesheet for that HTML
> page you can generate for this PDF button an URL like
> "http://yourserver.domain.com/document.xml?type=pdf". In your stylesheet
> you read that parameter and call the PDF-making stylesheet, whereas in
> the absence of this parameter you serve an HTML page.

How do I read an URL parameter from a stylesheet? Can you show an
example?


Mime
View raw message