xsl-list
[Top] [All Lists]

RE: [xsl] passing a sequence as a parameter

2008-02-27 02:05:12

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
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--