[XML-SIG] DOM Nodes: Identity test

Andrew M. Kuchling akuchlin@cnri.reston.va.us
Thu, 25 Mar 1999 14:29:18 -0500 (EST)


Paul Prescod writes:
>We could agree that the only by-value check that makes sense is the
>identity check. This is the same as saying that the location of a node in
>the tree is part of its value. 

I just remembered that we discussed this last year; see the thread
starting at
http://lists.w3.org/Archives/Public/www-dom/1998OctDec/0330.html .  At
the time, we concluded that no reasonable meaning for == could be
chosen, and if a future DOM Level N draft specifies some different
behaviour, we're in trouble, so it would be best to have a completely
different method for such comparisons.

	So, how about isSameNode()?  node1.isSameNode(node2) returns
true iff node1 and node2 refer to the same underlying node in the
tree.

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
Returned to his place, he sits quite still, pretending he doesn't exist, which
is a harder game than you might imagine.
    -- The Enigma kills yet more time, in ENIGMA #4: "And Then What?"