XSLProcessor.setParam
Tuesday, June 1st, 2004
The XSLProcessor.setParam(uri, name, value) allows you so set the value of a top-level stylesheet parameter.
The uri parameter is the namespace URI of the paramater name, which by the XSLT 1.0 specification is a qualified name.
That means that you can have:
<xsl:stylesheet xmlns:foo="urn:foo" xmlns:bar="http://bar.com/params" ...>
<xsl:param name="foo:param1"/>
<xsl:param name="bar:param2"/>
<xsl:param name="param3"/>
so the parameter names can be namespace-qualified, where the namespace prefix is a shortcut syntax for referring to the fully-specified namespace URI.
So, to set values for all three of these parameters above, you would do:
xslProc.setParam("urn:foo","param1","'val1'");
xslProc.setParam("http://bar.com/params","param2","'val2'");
xslProc.setParam("","param3","'val3'");
The parameter value is expected to be a valid XPath expression (note that string literal values would therefore have to be explicitly quoted)
[Gleaned from mailing list email from Steve Muench and documentation]