W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2003

[F&O] 15.2.1.1 Deep Equality of Nodes

From: Dimitre Novatchev <dnovatchev@yahoo.com>
Date: Sat, 22 Nov 2003 06:47:42 -0800 (PST)
Message-ID: <20031122144742.85634.qmail@web41103.mail.yahoo.com>
To: public-qt-comments@w3.org

Two issues and a comment:

Issue 1:
=======
The following text contradicts the code that it attempts to explain:

"Return true if the the two nodes have names that compare equal as
xs:QNames or if they do not have names.

if (not(fn:deep-equal(fn:node-name($parameter1),
fn:node-name($parameter2)))) 
then fn:false()
else"

Obviuosly, the explanation must be something like:

     "Return false if the two nodes have different names."

Issue 2:
=======
"Check if both element nodes have simple types. if so, compare their typed
values, else compare their children recursively. The result is true if and
only if the children of both nodes are all pairwise deep-equal, ignoring
comment and processing instruction node children in both cases."

What is the rationale for ignoring comment and PI children?

Such a decision results in the strange fact that two nodes with different
number of children may be deep-equal.

Comment:
=======
Using code to define the function is a good step forward, however the
presented code seems too lengthy and unstructured.

Probably the code would be shorter and more understandable if a few
auxiliarry functions were defined and used in it.


Dimitre Novatchev.


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
Received on Saturday, 22 November 2003 09:48:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:28 GMT