[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Trying to read a parameter in the request in a XSL file

Subject: Re: [xsl] Trying to read a parameter in the request in a XSL file
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Sat, 4 Oct 2003 13:13:37 -0400

On Friday, October 3, 2003, at 04:28 PM, Diodato, Anthony wrote:

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.

You could do this in AxKit by simply adding a top-level param at the top of the XSL document with the correct name. This will allow access the URI parameter from the XSL. E.g.,

<xsl:stylesheet ... >
<xsl:param name="L1"/>
<xsl:template ... [etc]

Then in your templates test if it was set (automagically) by AxKit from the URI parameter with a boolean test:

<xsl:if test="$L1">

the value is a string

<xsl:if test="$L1 = 'util'>

AxKit and Cocoon are similar so there might be a similar feature in Cocoon otherwise why not use AxKit ;-)


-- www.simonwoodside.com :: www.openict.net :: www.semacode.org 99% Devil, 1% Angel

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread