[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: () eq () vs () = ()

Subject: Re: () eq () vs () = ()
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 30 Sep 2011 13:30:41 +0100
Re:  () eq () vs () = ()
On 30/09/2011 10:43, Andrew Welch wrote:
I've recently found out (over on the saxon list) that:

() eq ()

returns the empty sequence, but

() = ()

returns false.



To add a little footnote, a couple of weeks ago I had a user who had written


test="contains(a,b) = false"

and in 1.0 this produced the same result as if he had written

test="contains(a,b) = false()"

because in 1.0, when you compare a node-set to a boolean you convert the node-set to a boolean and compare the two booleans, and the node-set false will usually convert to the boolean false(). But in 2.0 his code stopped working because the rules for comparing a node-set to a boolean changed, the WG imagining very few users would do this intentionally...

Michael Kay
Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.