Subject: RE: how to pass in saxon command line parameters for use in xsl file
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 8 Jan 2005 09:17:23 -0000
|
Sure. Declare
<xsl:param name="x" as="xs:integer" required="yes"/>
at the top level of a (2.0) stylesheet
and then invoke Saxon as
java -jar saxon8.jar source.xml style.xsl x=17
and then access the variable $x in any XPath expression.
(Or similarly in XSLT 1.0, but then the "as" and "required" attributes are
not available).
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: dmitrik@xxxxxxxxxxxxxx [mailto:dmitrik@xxxxxxxxxxxxxx]
> Sent: 08 January 2005 01:04
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: how to pass in saxon command line parameters
> for use in xsl file
>
> Is it possible to pass in a command line parameter with saxon
> and then
> use the value passed in within the .xsl file? Any examples of
> how to do this?
> Need to pass in a number and use it in calculation within xsl.
>
> Thanks,
> Dmitri
|