|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: Using a java variable inside XSLT
> We are attempting to display a first and last name in HTML
> using XSLT. We
> obtained the first and last name from the session object and
> put the values
> into a java variable. How can we display the value of our
> java variable in
> HTML using an XSLT template?
Just pass the values into the transformation as global parameters.
In the stylesheet, write
<xsl:param name="firstname"/>
etc
In the application, assuming you are using a Java processor with the JAXP
1.1 API,
write
Transformer transformer = templates.newTransformer();
transformer.setParameter('firstname', value);
Mike Kay
Software AG
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








