xsl-list
[Top] [All Lists]

RE: Parsing an array as a parameter

2003-12-22 04:09:51
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(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
kelsonho(_at_)jjfa(_dot_)org
Sent: 22 December 2003 05:56
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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



<Prev in Thread] Current Thread [Next in Thread>