Thomas --

You are not creating a boolean variable but a result tree fragment which is
never empty.

Try:

  <xsl:variable name="boolean_test" select="false()"/>

and see what happens.

HTH,
Gary

> -----Original Message-----
> From: Thomas F. O'Connell [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 20, 2003 3:00 PM
> To: xalan-c-users@xml.apache.org
> Cc: xalan-dev@xml.apache.org
> 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
> > 
> 

Reply via email to