[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Generating jsp java code in .xsl files


Subject: RE: [xsl] Generating jsp java code in .xsl files
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Fri, 19 Nov 2004 13:33:23 +0200

Hi,

>    Hi all! I am trying to generate java code (intended for a jsp page)
> inside a .xsl file. I want to produce an output similar to :
>
> <% String foo = "a_value"; %>. How can I achieve this?? The
> result I am
> getting is either a print of the aforementioned code in the
> html output
> of the jsp page or a null value in the html code.
>
> I have tried it like this (mainly) :
>
> <xsl:text disable-output-escaping="yes">
> 	&lt;% String foo = "a_value"; %&gt;
> </xsl:text>

And this should generate

"
	<% String foo = "a_value"; %>
"

(Note the whitespace.) If you're not getting that, your XSLT engine probably
has a bug in it. If your problem is compiling XSLT generated JSP into a
Servlet and running that, it's off-scope for this mailing list.

Cheers,

Jarno


Current Thread
Keywords