You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "McNeill, Keith D." <mc...@iconverse.com> on 2001/03/30 18:52:04 UTC

boolean() bug --> different results in xalan 1.1.2 & 2.0.1

With the following template:
 
<?xml version="1.0"?>
<xsl:stylesheet 
    xmlns:xsl=" http://www.w3.org/1999/XSL/Transform
<http://www.w3.org/1999/XSL/Transform> "
    version="1.0">
 
  <xsl:output indent="yes"/>
 
  <xsl:template name="nothing">
  </xsl:template>
 
  <xsl:template match="/">
    <xsl:variable name="value">
      <xsl:call-template name="nothing"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="boolean($value)">
        <xsl:text>we have a value -- 2.0.1 result</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>no value -- 1.1.2 result</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>  
 
 
--------------------
 
In 1.1.2 the result is:  no value -- 1.1.2 result
    which is what I expect.
 
In 2.0.1 the result is:  we have a value -- 2.0.1 result
    which isn't what I would expect....seems like a bug.
 
Keith