Skip to content Skip to sidebar Skip to footer

Pass User Input To XSL Stylesheet

I want to expand a webservice written in java and javascript with a XSL 2.0 stylesheet. The stylesheet is based on this(XSLT 2.0: Transform notation in plain text to svg) XSL sheet

Solution 1:

Use transformer.setParameter("key", "value");

and within the stylesheet use <xsl:param name="key" /> at the beginning of your stylesheet.

Then you refer to it like to any other xsl variable: e.g.

<xsl:value-of select="$key"/>

Post a Comment for "Pass User Input To XSL Stylesheet"