You could do a transformation on the stylesheet to generate code which does
this: given the input
<xsl:param name=“x”/>
<xsl:param name=“y/>
you could generate the output
<xsl:template name=“get-params”>
<params x=“{$x}” y=“{$y}”/>
</xsl:template>
and then xs:include this into your stylesheet code.
Michael Kay
Saxonica
On 10 Sep 2015, at 10:48, Jorge . chocolate(_dot_)camera(_at_)gmail(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Is there a way to get the names and values of all parameters passed to
an XSLT transformation? I would like to be able to dump all of them to
a file during the transformation itself without having to hardcode
their names in the XSL fragment that outputs the file.
I am using Saxon-HE 9.2.1.2J and XSLT 2.0. I refer specifically to
custom parameters passed to the stylesheet from the command-line like
"FOO=bar" in:
java -jar saxon9he.jar -xsl:transform.xsl -it:main 'FOO=bar'
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--