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 4172 - [UPD] Attribute name clash
Summary: [UPD] Attribute name clash
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-09 18:35 UTC by John Snelson
Modified: 2007-02-15 12:00 UTC (History)
0 users

See Also:


Attachments

Description John Snelson 2007-01-09 18:35:23 UTC
The XQuery Update specification does not deal with cases when the names of inserted attributes clash. They could clash with each other, or with attributes that already exist. I assume that this should be an error scenario.
Comment 1 Andrew Eisenberg 2007-01-10 22:39:24 UTC
Answering as an individual, I believe that we have covered this with a very generic statement in section 3.2.2 upd:applyUpdates, Semantics, bullet 5:

"If the resulting XDM instance violates any constraint specified in [XQuery/XPath Data Model (XDM)], a dynamic error is raised [err:XUDY0021]."

Comment 2 John Snelson 2007-01-11 11:06:47 UTC
I can see how that applies, and missed that on my readings through the spec. However, it might be more user friendly to expand on this statement in places where it applies - such as this case.
Comment 3 Frans Englich 2007-01-11 12:36:14 UTC
I think the suggestion in #2 is sensible. The problem with having a broad statement, although if it correctly covers the conditions, is that it's then up to the reader to figure out where it applies. I believe having more targeted descriptions of error conditions improves the interoperability in these areas, as well as making test-suite creation easier.

Perhaps a sensible editorial change is to remove the broad statement(so we don't get overlaps, which is messy even if it's with identical codes) and add a sentence in each specific case it applies.
Comment 4 Don Chamberlin 2007-02-13 18:38:53 UTC
John,
Thanks for your comment, which was discussed by the working group on 13 Feb 2007. The consensus of the working group is that the error of attribute name clashes cannot be detected until applyUpdates time, because the clashing attribute names might have been created by different kinds of expressions (for example, a rename and an insert). So we think that the error is identified in the right place, Rule 5 of upd:applyUpdates. However, we agree that it would be helpful to identify attribute name clashes as a specific example of the rule. Therefore we will add a Note to the next version of the document identifying attribute name clashes as an example of a data model constraint violation, with error code XUDY0021.

I hope this change addresses your concern, and I am marking this bug as "Fixed". You may change its status to "Closed" or reopen it if you have additional comments or concerns.

Regards,
Don Chamberlin (for the Query Working Group)