Re: [xsl] creating a jsp file using xslt

Subject: Re: [xsl] creating a jsp file using xslt
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Sat, 03 Jul 2004 06:39:47 -0700
C J wrote:

Does anyone have an example that transforms some xml
data using xslt to produce a jsp page?



You need to be more specific. What version of JSP are you using (if 2.0 it is much simpler)?

Describe more of what you want to do. An answer to your question could be:

<xsl:template match="/">
 <jsp:scriptlet>
   String foo = "<xsl:value-of select="rootElem/@attr1"/>";
 </jsp:scriptlet>
 // jsp 1.2
 <jsp:expression>foo</jsp:expression>
 // jsp 2.0
 ${foo}
</xsl:template>

best,
-Rob

Current Thread