Subject: RE: [xsl] RE: Using a java variable inside XSLT From: "sumev" <skohli@xxxxxxxxxxxxxxx> Date: Mon, 6 Aug 2001 17:39:36 -0400 |
Cool! Solution is simple if you are using lets say xalan - so all you need to do is to use -> setStylesheetParam(String, String) - Method in class org.apache.xalan.client.XSLTProcessorApplet Submit a stylesheet parameter. XSLTProcessor processor =XSLTProcessorFactory.getProcessor(); processor.setStylesheetParam("newvar","\""+styleParam+"\""); processor.process(xmlSource, xslSource,htmlOutput); and declare global param in stlyesheet (use same name). <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:output method= "html"/> <xsl:paramname="newvar">Hello</xsl:param> <xsl:template match="/"> ................................ C'ya Sumev -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Katie McNally Sent: Monday, August 06, 2001 5:04 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] 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? Our XSLT template is converting XML to HTML. The first and last names are not in the XML. What is the best way to display this data? Thanks, Katie _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp 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 -> |
---|---|---|
[xsl] RE: Using a java variable ins, Katie McNally | Thread | RE: [xsl] RE: Using a java variable, Michael Kay |
RE: [xsl] RE: Using a java variable, Crowers, Steve | Date | RE: [xsl] not wellformed contents o, Wendell Piez |
Month |