|
|
|
|
|
| 2004 |
01
|
02
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
11
|
12
|
| 2005 |
01
|
02
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
11
|
12
|
| 2006 |
01
|
02
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
11
|
12
|
| 2007 |
01
|
02
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
11
|
12
|
| 2008 |
01
|
02
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
11
|
12
|
|
|
Error in compairison of variables (possibly type) thewade
|
|
From: thewade <pdman@xxxxxxxxxxxxxxxx>
To: dev@xxxxxxxxxxxxxxxx
Subject: Error in compairison of variables (possibly type)
Date: Mon, 19 Mar 2007 19:49:55 -0700
User-agent: Internet Messaging Program (IMP) H3 (4.1.1)
Greetings,
I recently downloaded and installed your mod_xslt software and was
quite pleased with the ease of installation and configuration.
I think I found a bug though, that I hope you can help me with.
The value-of always returns false in the case below:
(position in this case goes from 1 to 10)
<xsl:variable name="this_show" value="position() * 2 - 1"/>
<xsl:variable name="half_shows" value="ceiling(last() div 2)"/>
<xsl:value-of select="$this_show <= $half_shows"/>
But if I do below I get true half the time and false the other half:
<xsl:value-of select="position() * 2 - 1 <= ceiling(last() div 2)"/>
The problem is stopping me because I am trying to call items like this:
<xsl:value-of select="../show[$this_show]/venue"/>
The above returns nothing ever, but if I do this:
<xsl:value-of select="../show[1]/venue"/>
I get the venue for the first show.
It seems like the variables $var are being treated as strings - that
is the only thing I can think of that would cause this problem.
Can you lend me a hand?
Thanks,
-wade
pdman@xxxxxxxxxxxxxxxx
| |
|