You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeremy Quinn <je...@media.demon.co.uk> on 2000/06/04 17:02:20 UTC
Set XSL Variable from XSP?
Hi All,
I am trying to write an XSL that uses XSP to help process the page.
I need to set an XSL Variable to an XSP calculated string, so the XSL can
test the value.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
<xsl:strip-space elements="*"/>
<xsl:template match="slides">
<xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>
<xsl:processing-instruction
name="cocoon-format">type="text/xml"</xsl:processing-instruction>
<xsp:page
language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
<slides>
<xsp:logic>
String query = request.getQueryString();
</xsp:logic>
<xsl:variable name="section"> <!-- Here -->
<xsp:expr>query</xsp:expr>
</xsl:variable>
<xsl:if test="$section ....">
[ ..... ]
</xsl:if>
</slides>
</xsp:page>
</xsl:template>
[ ..... ]
</xsl:stylesheet>
Just sets $section to the string "query" !?
Help! What am I doing wrong?
And, why do I have to delete the repository to get the XSL/XSP to recompile?
thanks
regards Jeremy
--
___________________________________________________________________
Jeremy Quinn Karma Divers
webSpace Design
HyperMedia Research Centre
<ma...@mac.com> <http://www.media.demon.co.uk>
<phone:+44.[0].20.7737.6831> <pa...@sms.genie.co.uk>