Re: [xsl] saxon9 passing values

Subject: Re: [xsl] saxon9 passing values
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 10 Aug 2009 14:13:52 +0200
minimag wrote:

I have three files: input.xml, transform.xsl ans param.xsl

The param.xsl contains a lot of params, e.g.

<xsl:param name="number.chapter">
<xsl:value-of select="1"/>

Why not simply <xsl:param name="number.chapter" select="1"/> ?

The param.xsl should be used together with the transform.xsl.

I tried to change the <xsl:value-of select="1"/> to <xsl:value-of select="0"/> using an xslt processor.
Is this possible using saxon or should I use an other approach?

Well an XSLT stylesheet module is an XML document so you can process and output it using another XSLT stylesheet but the whole point of (top level) xsl:param elements is that the XSLT processor provides an API to set those parameters before you run a transformation. So instead of trying to write a stylesheet to manipulate transform.xsl before you use it in a transformation you should simply use the API of your XSLT processor to set those parameters as needed.


	Martin Honnen

Current Thread