In my XSL i have included a dropdown box which have values like,
one
two
three
four
five
If I select the value “one”, then the template “one” should be applied.
<xsl:template match="one">
<!-- code goes here -->
</xsl:template>
like wise two, three four and five should match their appropriate templates.
Is it possible using Javascript, so that onchange() method can get the selected value and call its own template.
If there is any other way, please suggest me.
Thanks,
jeyaa
That’s not the way client-side XSLT currently works. The XSLT is executed to generate (HTML + Javascript), and by the time any user interaction occurs, the XSLT has finished its job. I’m trying to change that model with Saxon-CE, but that’s in the future.
For the moment, the best that you can do is catch the event in Javascript, and have the Javascript invoke a new XSLT stylesheet transformation.