Changes

Jump to navigation Jump to search
3 bytes added ,  15:06, 10 July 2011
The <code>$params</code> argument can be used to bind variables to a stylesheet. It can be specified as
* <code>element(xslt:parameters)</code>: <code>&lt;xslt:parameters/&gt;</code> must be used as root element, and the parameters are specified as child nodes, with the element name representing the key and the text node representing the value:<br /><code>&lt;xslt:parameters&gt;<br/>&nbsp;&nbsp;&lt;xslt:key1&gt;value1&lt;/xslt:key1&gt;<br/>&nbsp;&nbsp;...<br/>&lt;/xslt:parameters&gt;</code>
* [[Map_Functions|map structure]]: all parameters can be directly represented as key/value pairs:<br /><code>map { "key1" := "value1", ... </code>}. <br/>This variant is more compact, and it facilitates the binding of arbitrary data types. Note, however, that only strings are currently supported when working with Saxon. Next, the map structures are not part of the XQuery language yet, as the standardization is still in progress.
If Saxon is found in the Java classpath, <code>XSLT 2.0</code> is used. Otherwise, Java’s internal <code>XSLT 1.0</code> implementation is used to do the transformation.<br />
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu