Page 1 of 1

Using XSLT to Render a JSP Page

Posted: Wed Nov 29, 2006 2:10 pm
by kwolters
Hi,
I have a problem when using JSP in XSLT Stylesheets.
I have one XSL Stylesheet "Product.xsl" which includes a Stylesheet "Input.xsl"
In Product.xsl I call a JSP command ( request.getQueryString()). I save this in a variable. This variabel shall be put in a function in Main.xsl.

Product.xsl
<% String mychangedqueryString = request.getQueryString(); %>
<xsl:variable name="tmpmychangedqueryString"><xsl:text disable-output-escaping="yes"><![CDATA[<%= mychangedqueryString %> ]]> </xsl:text></xsl:variable>

<xsl:call-template name="do-a-link">
<xsl:with-param name="MyQueryString" select="$tmpmychangedqueryString"/>
</xsl:call-template>

Input.xsl:

<xsl:template name="do-a-link">
<xsl:param name="MyQueryString" />
...
<xsl:variable name="url">?<xsl:value-of select="$MyQueryString"/></xsl:variable>
…
</xsl:template>

The JSP Code is not interpreted when the JSP Site is rendered. I get "<%= mychangedqueryString %> " but not the content of it, request,getQueryString() is not executed.

Thanks!
Kirstin