RE: [xsl] passing a sequence as a parameter

Subject: RE: [xsl] passing a sequence as a parameter
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 27 Feb 2008 09:04:36 -0000
> I am looking for a way of working with a sequence passed to a 
> stylesheet as a parameter. For example, I have an xml file as 
> follows...

Just to confirm what others have said:

(a) the way you pass parameters to a stylesheet (and the kind of parameters
you can pass) is implementation-defined

(b) In Saxon, you can pass a sequence when the stylesheet is invoked from
Java, but not when it is invoked from the command line. If you want to do
this from the command line, you will have to parse a string value from
within the stylesheet.

It is possible to provide code that caters for different calling conventions
by providing multiple parameters or by use of overlay stylesheet modules.
For example:

<xsl:param name="colour-list" as="xs:string"/>
<xsl:param name="colours" as="xs:string*" select="tokenize($colour-list,

Michael Kay

Current Thread