This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6372 - [FO] deep equality of namespace nodes
Summary: [FO] deep equality of namespace nodes
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 14:10 UTC by Michael Kay
Modified: 2009-02-03 16:29 UTC (History)
0 users

See Also:


Attachments

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