Re: [xsl] XSL and HTML select

Subject: Re: [xsl] XSL and HTML select
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Mar 2001 09:13:31 +0000
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


Current Thread