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 TagLib to set a variable?
Date Tue, 06 Jun 2000 08:54:47 GMT

Hi,

I am trying to set an XSL Variable to the value of a TagLib, it is not
working, can anyone help me sort out why?

	<xsl:variable name="query"><request:get-query-string/></xsl:variable>

	always returns empty, regardless of the query string

Simplified example .....

<?xml version="1.0"?>
<xsl:stylesheet  version="1.0"
 xmlns:xsp="http://www.apache.org/1999/XSP/Core"
 xmlns:request="http://www.apache.org/1999/XSP/Request"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

 <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"
   xmlns:request="http://www.apache.org/1999/XSP/Request"
  >
   <slides>
    <xsl:variable name="query"><request:get-query-string/></xsl:variable>
    <xsl:variable name="next">
     <xsl:choose>
      <xsl:when
test="$query=''"><xsl:text>slides-smil.xsl</xsl:text></xsl:when>
      <xsl:otherwise><xsl:text>slides-qtmov.xsl</xsl:text></xsl:otherwise>
     </xsl:choose>
    </xsl:variable>

    <xsp:pi target="xml-stylesheet">href="<xsl:value-of select="$next"/>"
type="text/xsl"</xsp:pi>
    <section><xsl:value-of select="$query"/></section>
    <xsl:apply-templates/>
   </slides>
  </xsp:page>
 </xsl:template>

</xsl:stylesheet>

thanks for any help

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