RE: Trying to read a parameter in the request in a XSL
I've tried this both ways. The way that you have described, and the way that the article has described, but both to no avail, Any suggestions. Thanks Tony -----Original Message----- From: Lars Huttar [mailto:lars_huttar@xxxxxxx] Sent: Friday, October 03, 2003 6:07 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: Trying to read a parameter in the request in a XSL file Anthony, > When you first go to http://localhost:8100/cocoon/test.xml at first, only > the Level1 tag will be shown. (Utility as a link) > Now, when you click on Utility (This is the link >> > http://localhost:8100/cocoon/test.xml?L1=util for Utility) > You will still be on test.xml, but in my XSL, I want to take the L1 > parameter, and be able to display the Level2's below it. In answer to the question in the subject line, in order for an XSL stylesheet to read request parameters in cocoon, you have to set up the sitemap to make that possible. You can do this a few different ways. The easiest is: 1) In your map:transform element, use use-request-parameters: <map:transform src="foo.xsl"> <map:parameter name="use-request-parameters" value="true" /> </map:transform> (assuming your default transformer is XSLT) Then every request parameter, such as L1 in your example, will be passed to the parameter in the stylesheet of the same name, e.g. <xsl:param name="L1" /> And when you reference the param as "$L1" in your stylesheet, the value will be 'util'. See also http://www.cocooncenter.de/articles/request-params/transformer.html for a slightly different way to do this. HTH, Lars (If you reply to this message and want me to see your reply, please cc: me directly.) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format