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

RE: Parsing an array as a parameter

Subject: RE: Parsing an array as a parameter
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 22 Dec 2003 11:09:51 -0000
xsl array
The mappings from Java classes to XPath types aren't defined in any
standard, they depend on the product you are using.

Saxon 7.x, which implements XSLT 2.0 and XPath 2.0, will map an array of
strings to an XPath sequence of strings. But XPath 1.0 doesn't support
sequences of strings in its type system, so it's unlikely that an XSLT
1.0 processor will do the same. Your best bet would be to construct an
XML document in which the strings are represented as elements, and then
pass the root node of the document as a parameter.

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> kelsonho@xxxxxxxx
> Sent: 22 December 2003 05:56
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Parsing an array as a parameter
> 
> 
> Hi
> I am new to XSLT...so I am not sure if this is possible..
> 
> I use JSP to invoke XSLT...and I want to achieve the following:
> 
> Given an array in Java, I want to parse the array as A XSLT 
> parameter and then transform it using for-each..
> 
> Eg. I have a parameter call "students"..which would contain a 
> list of names of students...
> 
> ie: String [] students;
> 
> Can I do something like: 
> studentTransformer.setParameter("students",students
> []);???
> 
> Anyways, thanks for reading..
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.