XML : Template returns true() when is told to return false

Why am I getting true as a return value from this template:

  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">          <xsl:template name="return-false">                  <xsl:value-of select="false()"/>          </xsl:template>          <xsl:template match="/">                  <root>                          <xsl:variable name="call-template">                                  <xsl:call-template name="return-false"/>                          </xsl:variable>                          <xsl:if test="$call-template = true()">                                  <FALSE/>                          </xsl:if>                  </root>          </xsl:template>  </xsl:stylesheet>  
Guess what I am getting on the output document FALSE element. I am wondering should I cry or should I laugh on my struggle on this simple example. My frustration hit the sky.

No comments:

Post a Comment