I think this bug might be due to lazy type converions in XSLTC. Have you tried passing the numbers into the numbers()-function before the comparison, i.e.: <xsl:value-of select="number($var) < number(3)"/> ?
The assignment through the if-construct makes $var into a result-set; I'm not sure if XSLTC handles the type-conversions very well... K. > -----Oorspronkelijk bericht----- > Van: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] > Verzonden: zaterdag 13 juli 2002 17:28 > Aan: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] > CC: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED]; 'Ivelin Ivanov' > Onderwerp: Found bug in XSLTC > > > Hi all, > > Found a bug in XSLTC, version from > http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-cocoon2/lib/core/xsltc. > jar?rev=HEAD&content-type=text/plain. > > Here is XSLT reproducing the bug: > ----------8<---------- > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:param name="var"> > <xsl:if test="1 = 1">2</xsl:if> > </xsl:param> > > <xsl:param name="var2" select="string($var)"/> > > <xsl:template match="/"> > Value of var: <xsl:value-of select="$var"/> > var is greater then 3: <xsl:value-of select="$var > 3"/> > var is less then 3: <xsl:value-of select="$var < 3"/> > > Value of var2: <xsl:value-of select="$var2"/> > var2 is greater then 3: <xsl:value-of select="$var2 > 3"/> > var2 is less then 3: <xsl:value-of select="$var2 < 3"/> > </xsl:template> > </xsl:stylesheet> > ----------8<---------- > > > Output: > ----------8<---------- > Value of var: 2 > var is greater then 3: false > var is less then 3: false > > Value of var2: 2 > var2 is greater then 3: false > var2 is less then 3: true > ----------8<---------- > > All other XSLT processors (Xalan, SAXON) produce output: > ----------8<---------- > Value of var: 2 > var is greater then 3: false > var is less then 3: true > > Value of var2: 2 > var2 is greater then 3: false > var2 is less then 3: true > ----------8<---------- > > > Regards, > Vadim > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]