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>
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.

Received on Tuesday, 9 April 2002 16:24:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:16 UTC