|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Parsing an array as a parameter
Hello, >From the java side you will need to marshal data from your Array object to xml, then you will need to inject xml as an xslt parameter. To achieve the first step you could hand code up some marshalling code or use any of the high quality libraries that exist today; castor or Apache's xmlbeans effort comes to mind. Alternately, you could leave it up to the XSLT processor to do this if you are using JAXP/TRAX to call the transform. This depends on what XSLT processor you intend to invoke from your java code...I would suggest reading up Elliotte Rusty Harold's http://cafeconleche.org/books/xmljava/ to see how you generically invoke an XSLT process in java. Generally you should be able to setParameter(String name, Object value), whereby the Object value is marshaled into a type that makes sense for XSLT. GL, Jim Fuller -----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
|

Cart








