[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Parsing an array as a parameter
Subject: RE: [xsl] Parsing an array as a parameter From: "Jim Fuller" <jim.fuller@xxxxxxxxxxxxxx> Date: Mon, 22 Dec 2003 12:14:49 -0000 |
interesting, though the mappings are not defined in any spec is there a need to amend the current spec as to the behavior of xsl:param in such situations...does setting xslt version have any impact on what xsl:param returns just a thought. Ta, Jim Fuller -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Michael Kay Sent: 22 December 2003 11:10 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] 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: [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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Parsing an array as a par, Michael Kay | Thread | Re: [xsl] Parsing an array as a par, Mukul Gandhi |
RE: [xsl] combining 2 or more xml f, Jim Fuller | Date | Re: [xsl] combining 2 or more xml f, james walker |
Month |