W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > April 2002

node equality vs. value identity

From: Howard Katz <howardk@fatdog.com>
Date: Tue, 9 Apr 2002 13:21:28 -0700
To: <www-xml-query-comments@w3.org>
Message-ID: <NFBBKEMEJKFJGCPOOKHCMEJDCEAA.howardk@fatdog.com>
I was just looking through the new FS document and noted the short example
snippet under "2.2.2: Node identity," demonstrating the difference between
node equality and value equality. For what it's worth, the following two
queries provide an even more succinct demonstration of this distinction:

	<a/> = <a/>		=> true

	<a/> == <a/>	=> false

I find the second query to be particularly interesting, since at first
glance its results appear quite non-intuitive if you haven't previously
encountered element constructors. It provides, of course, a very striking
and salutary demonstration of the fact that each application of an element
constructor generates a new and unique node.

Best,
Howard
Received on Tuesday, 9 April 2002 16:24:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 February 2007 00:13:05 GMT