Hi Thomas,
> > <xsl:variable name="boolean_test">
> > <xsl:value-of select="false()" />
> > </xsl:variable>
This does not create a boolean variable. It creates a result tree fragment
containing a single text node with the value "false". RTFs have a unique
property that their boolean value is always true, even when empty. (Not
that this one is empty...)
You probably meant to do this:
<xsl:variable name="boolean_test" select="false()"/>
Dave
|---------+--------------------------->
| | "Thomas F. |
| | O'Connell" |
| | <[EMAIL PROTECTED]|
| | com> |
| | |
| | 06/20/2003 02:59|
| | PM |
|---------+--------------------------->
>---------------------------------------------------------------------------------------------------------------|
|
|
| To: xalan-c-users@xml.apache.org
|
| cc: xalan-dev@xml.apache.org, (bcc: David N
Bertoni/Cambridge/IBM) |
| Subject: Re: boolean variable evaluation
|
>---------------------------------------------------------------------------------------------------------------|
Sorry, I've not been getting enough sleep. Restating my first sentence:
I've got a question about Xalan's behavior regarding setting variables
explicitly to the results of boolean functions.
Restating my example use of the variable:
<xsl:if test="$boolean_test">
<message>This is not what I was expecting</message>
</xsl:if>
-tfo
On Fri, 2003-06-20 at 16:54, Thomas F. O'Connell wrote:
> I've got a question about Xalan's behavior regarding setting booleans to
> explicit functions.
>
> If I've got a stylesheet that includes the following:
>
> <xsl:variable name="boolean_test">
> <xsl:value-of select="false()" />
> </xsl:variable>
>
> And I then use it in this sort of expression:
>
> <xsl:if test="boolean_test">
> <message>This is not what I was expecting</message>
> </xsl:if>
>
> I'll get the message every time. Is that correct and expected behavior,
> or is it a bug?
>
> -tfo
>