This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSL and HTML select


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]