You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Simon Waddington <si...@zapnetworks.com> on 2000/02/09 03:49:01 UTC

How to change the style based on request parameters...

I'm still in the early stages of developing with Cocoon so forgive me if
this one is obvious or obviously stupid...

Is there a way to dynamically change the stylesheet used to process the
output of XSP ?  What I'm trying to do is have one set of content as XML
which is displayed in different ways depending on the request parameters.
Hence asking for page.xml would give a "normal" version and
page.xml?help=true would give the same page with added help.

I know I could write XSP logic to selectively or generate the help content
however this seemed like putting presentation control in the wrong place.
I'd just want to change the presentation by using a different stylesheet, or
by having the stylesheet sensitive to the request parameters.

All attempts to access request paramters from the stylesheet have failed
thus far, as have attempts to change the stylesheet from XSP.  However as I
said I'm still new to this...

Any ideas on how to do this are greatly appreciated.

Thanks,

Simon.