[XML-SIG] Equality tests on DOM nodes
Fred L. Drake
Fred L. Drake, Jr." <fdrake@acm.org
Fri, 11 Dec 1998 12:20:01 -0500 (EST)
Andrew M. Kuchling writes:
> * If the two nodes have identical type and value, should the
> comparison be recursive, comparing the children of the nodes. The ==
> operator would then be comparing entire subtrees rooted at node1 and
> node2. I'm not certain if this is the best choice for the meaning of
> ==, but see no clear reason to choose recursive vs. non-recursive ==.
> Any suggestions?
Since I'm the one who raised this with Andrew, I'll mention that my
first reaction was that it would be recursive. I don't see any clear
indication that "shallow" equality has any real meaning.
This corresponds to the basic notion of equality testing in Python.
-Fred
--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
1895 Preston White Dr. Reston, VA 20191