[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: passing a sequence as a parameter

Subject: RE: passing a sequence as a parameter
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 27 Feb 2008 09:04:36 -0000
RE:  passing a sequence as a parameter
> 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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.