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

RE: Passing a variable number of parameters or rather

Subject: RE: Passing a variable number of parameters or rather an array
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 20 Apr 2005 19:41:11 +0100
java array of strings
> I would like to pass an array of strings to the stylesheet. 
> Does anyone have
> an example of doing this, or know where one is. I looked at 
> xalan examples
> and none of the examples seem to fit, plus I can't find one 
> anywhere else.
> 

XSLT 2.0 supports a data type "sequence of strings" so an XSLT 2.0 processor
is likely to provide a mechanism for passing a sequence of strings as a
parameter value. With Saxon 8.x, you can do this by passing a Java array of
strings or List of strings to the JAXP Transformer#setParameter() method.

XSLT 1.0 doesn't have such a data type, so it's typically handled (as others
have said) by passing either:

(a) an XML document, from which you can extract the string

(b) a single string containing the actual strings separated by spaces or
commas (say), which your stylesheet can then tokenize.

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.