In XSLT, parameters may be used as a way to pass
additional information to a
stylesheet. libxslt accepts
XSLT parameters as one of the values passed to
xsltApplyStylesheet.
In the tutorial example and in xsltproc,
on which the tutorial example is based, parameters to be passed take the
form of key-value pairs. The program collects them from command line
arguments, inserting them in the array params, then
passes them to the function. The final element in the array is set to
NULL.
If a parameter being passed is a string rather than an
XSLT node, it must be escaped. For the tutorial
program, that would be done as follows:
tutorial]$ ./libxslt_tutorial --param rootid "'asect1'"
stylesheet.xsl filename.xml
