Re: [saxon] casting result tree fragment to boolean

Subject: Re: [saxon] casting result tree fragment to boolean
From: Mike Brown <mike@xxxxxxxx>
Date: Sat, 19 Aug 2000 20:07:34 -0600 (MDT)
David Allouche wrote:
> Here is what is said in "XSLT Programmer's Reference" about converting a
> result tree fragment to a boolean (p. 427)
> 
> - - - XSLT Programmer's Reference - - -
> The result tree fragment is first converted to a string, and the string is
> then converted to a Boolean.  The resulting boolean is true if the result
> tree fragment contains any non-empty text nodes, and is false otherwise.
> - - - - - - - - - - - - - - - - - - - - 

That is the one and only mistake in Mike Kay's book. Any result tree
fragment will be true because it is treated like a node-set and will
always have at least one (root) node.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread