This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL and HTML select
- To: "Samuli Niiranen" <samuli dot niiranen at tut dot fi>
- Subject: Re: [xsl] XSL and HTML select
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Wed, 21 Mar 2001 09:13:31 +0000
- CC: xsl-list at lists dot mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <KDEHJKAMPGHOIJBCPKKFOEBMCAAA.samuli.niiranen@tut.fi>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Samuli,
> How can I relay the selected menu option to the XSL variable
> SelectedId ?
You need to pass the value of the selected menu option as a parameter
to the stylesheet. There's no magical link back to the stylesheet
that generated some HTML from the HTML that the stylesheet's
generated.
You need to define the parameter as a stylesheet parameter within the
XML. So at the top level use:
<xsl:param name="SelectedId" />
How you pass the parameter into the stylesheet depends on how and
where you're processing the stylesheet. I guess you're using MSXML or
Cocoon - both have documentation about how to use parameters with
them. Basically with Cocoon you can construct a URL to pass the
parameters with something like:
mydata.xml?SelectedId=4
With MSXML, you need to script it. Have a look at the MSXML SDK and
search for the setParameter method.
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list