cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Waddington" <si...@zapnetworks.com>
Subject RE: How to change the style based on request parameters...
Date Thu, 10 Feb 2000 19:32:46 GMT
Thanks, for wholesale changing of the style sheet I think you're probably
right.

I was hoping someone could tell me how to access request parameters from the
style sheet but I figure the way to do it is to write some XSP logic that
turns the request parameters into nodes in the document before it goes to
XSLT and then have that do different things depending on what the parameter
nodes say.  It could even just be a skeleton that includes different XSL
files that do the real work.

-----Original Message-----
From: Andy Lewis [mailto:Andy.Lewis@NSMG.VERITAS.com]
Sent: Wednesday, February 09, 2000 6:42 AM
To: 'cocoon-dev@xml.apache.org'
Subject: RE: How to change the style based on request parameters...


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:  4077184718@mobile.att.net  -  EMail:  andy.lewis@veritas.com
<mailto:andy.lewis@veritas.com>

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


		-----Original Message-----
		From:	Simon Waddington [mailto:simon@zapnetworks.com]
		Sent:	Tuesday, February 08, 2000 9:49 PM
		To:	cocoon-dev@xml.apache.org
		Subject:	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.


Mime
View raw message