[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: "Jim Fuller" <jim.fuller@xxxxxxxxxxxxxx>
Date: Mon, 22 Dec 2003 11:02:33 -0000
xslt parameter array
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


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.