[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: RE: Using a java variable inside XSLT

Subject: RE: RE: Using a java variable inside XSLT
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Tue, 7 Aug 2001 10:08:59 +0100
using java variables in html
> 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


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.