cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <je...@media.demon.co.uk>
Subject Set XSL Variable from XSP?
Date Sun, 04 Jun 2000 15:02:20 GMT

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

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>

Mime
View raw message