RE: [F&O] 15.2.1.1 Deep Equality of Nodes

Thank you for your comments!

Issue 1 -- wording fixed.

Issue 2 -- an equally compelling position is that nodes that differ only
in comment and PI children should not compare unequal.

Comment -- I am not entirely satisfied with the description of this
function.  We will work on improving it.

All the best, Ashok

-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Dimitre
Novatchev
Sent: Saturday, November 22, 2003 6:48 AM
To: public-qt-comments@w3.org
Subject: [F&O] 15.2.1.1 Deep Equality of Nodes


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 Friday, 28 November 2003 14:27:33 UTC