Bug 6372 - [FO] deep equality of namespace nodes
: [FO] deep equality of namespace nodes
Status: CLOSED FIXED
Product: XPath / XQuery / XSLT
Functions and Operators 1.0
: Recommendation
: PC Windows NT
: P2 normal
: ---
Assigned To: Michael Kay
: Mailing list for public feedback on specs from XSL and XML Query WGs
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-01-06 14:10 UTC by Michael Kay
Modified: 2009-02-03 16:29 UTC (History)
0 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kay 2009-01-06 14:10:19 UTC
One of the principles behind the design of fn:deep-equal() was that a node
should always be deep-equal to itself (that's why we defined NaN = NaN, for
example).

But as currently written, the rule for comparing namespace nodes (or
"bindings") requires (node-name($i1) eq node-name($i2)), which will not be true
for an unnamed namespace node (the default namespace), because node-name()
returns () for such a node, and (() eq ()) is ().

This doesn't affect XQuery 1.0 because namespace nodes are inaccessible, but it
does affect XPath and XSLT.
Comment 1 Michael Kay 2009-01-06 14:13:23 UTC
Also, the current rule causes the string-value of namespace nodes to be
compared using a collation - which isn't technically a bug, but it's certainly
a poor design choice. 
Comment 2 Michael Kay 2009-01-20 16:24:15 UTC
Accepted in principle that we should make both these changes; MK to draft
detailed text for review.
Comment 3 Michael Kay 2009-01-28 21:32:14 UTC
Erratum E42 has been drafted to fix this problem. The bug will not be marked as
fixed until the WG has reviewed and approved the proposed text.
Comment 4 Michael Kay 2009-02-03 16:28:50 UTC
The proposed erratum E42 was accepted by the joint WGs on 3 feb 2009


  翻译: