cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lewis <>
Subject RE: How to change the style based on request parameters...
Date Wed, 09 Feb 2000 14:42:15 GMT
I did this be replacing the File producer with one I wrote that looked at
the URL, and based on a properties file, added the Cocoon specific
processing instructions and the stylesheet identifier. It works great, and
keeps all the PIs out of the individual XML files.

Andy Lewis
VERITAS Software, Heathrow, Florida
Voice:  407-531-7584  -  Fax:  407-531-7686  -  Cell:  407-718-4718
Pager:  -  EMail:

" Some days, it is best to keep reality at arms length..."

		-----Original Message-----
		From:	Simon Waddington []
		Sent:	Tuesday, February 08, 2000 9:49 PM
		Subject:	How to change the style based on request

		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

		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.



View raw message