[xslt] possible bug in functions



I may have discovered a bug with functions when returning boolean values.  Do
the following test.  Create a variable as such:

<xsl:variable name="foo" select="false"/>

then do

<xsl:if test="$foo">
  <xsl:text>I see this as true</xsl:text>
</xsl:if>

That works fine.  Now, write a function like this:

<func:function name="foo">    
  <func:result>
    <xsl:value-of select="false"/>
  </func:result>
</func:function>

then do this

<xsl:if test="foo()">
  <xsl:text>I see this as true</xsl:text>
</xsl:if>

That does not work, you get the  message when you should not.

Dan

"I used to herd dairy cows.  Now I herd lusers.  Apart from the isolation,
I think I preferred the cows.  They were better conversation, easier to
milk, and if they annoyed me enough, I could shoot them and eat them."

-------------------------------------------------
IMP: http://horde.org/imp/       Free the Source!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]