This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [saxon] casting result tree fragment to boolean


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]