You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Scheuner <sc...@cos-data.de> on 2000/05/05 14:49:52 UTC

cannot evaluate params with xsl

I have a xsl where I want to evaluate a Query-String (from the URL)

I added to the xsl:

<xsl:param name="book"/>

and later:

<xsl:choose>
<xsl:when test="$book=1"> Value 1 </xsl:when>
<xsl:when test="$book=2"> Value 2 </xsl:when>
<xsl:when test="not($book)"> no value </xsl:when>
</xsl:choose>

Now "not($book)" is always true, not matter what URL I use
("test.xml?book=1, "test.xml?book="1", "test.xml?book=igetnuts", ...

Can somebody help me ?

Thanks
Michael


RE: cannot evaluate params with xsl

Posted by Michael Scheuner <sc...@cos-data.de>.
Hi!

Umps, sorry. Just upgraded to Cocoon 1.7.3, now it works fine :-)

Michael

> -----Original Message-----
> From: ulim@timeworld.com [mailto:ulim@timeworld.com]On Behalf Of Ulrich
> Mayring
> Sent: Monday, May 08, 2000 10:20 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: cannot evaluate params with xsl
> 
> 
> Michael Scheuner wrote:
> > 
> > I have a xsl where I want to evaluate a Query-String (from the URL)
> > 
> > I added to the xsl:
> > 
> > <xsl:param name="book"/>
> > 
> > and later:
> > 
> > <xsl:choose>
> > <xsl:when test="$book=1"> Value 1 </xsl:when>
> > <xsl:when test="$book=2"> Value 2 </xsl:when>
> > <xsl:when test="not($book)"> no value </xsl:when>
> > </xsl:choose>
> 
> Have you tried "$book='1'" ?
> 
> Ulrich
> 
> -- 
> Ulrich Mayring
> DENIC eG, Systementwicklung
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: cannot evaluate params with xsl

Posted by Ulrich Mayring <ul...@denic.de>.
Michael Scheuner wrote:
> 
> I have a xsl where I want to evaluate a Query-String (from the URL)
> 
> I added to the xsl:
> 
> <xsl:param name="book"/>
> 
> and later:
> 
> <xsl:choose>
> <xsl:when test="$book=1"> Value 1 </xsl:when>
> <xsl:when test="$book=2"> Value 2 </xsl:when>
> <xsl:when test="not($book)"> no value </xsl:when>
> </xsl:choose>

Have you tried "$book='1'" ?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung