[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Parsing an array as a parameter
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|