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 10235 - ID/IDREF constraints for complex types with simple content
Summary: ID/IDREF constraints for complex types with simple content
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2010-07-25 22:17 UTC by Michael Kay
Modified: 2010-11-03 20:56 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Kay 2010-07-25 22:17:36 UTC
Both in 1.0 and 1.1, when elements have a complex type with simple content and the simple content type is xs:ID or xs:IDREF, they do not generate entries in the ID/IDREF table, and their "IDness" is therefore ignored.

See Part 1, section 3.17.5.2 "ID/IDREF Table", rule 2 of the definition of "eligible item set".

This is highly counter-intuitive; if an existing schema has an element <ssid> serving as an xs:ID value, then one would not expect that evolving the schema to allow the <ssid> element to have an attribute should silently eliminate the uniqueness checking of the element's content. 

Another argument: if the user didn't intend the content to be checked for uniqueness, why would they specify its type as xs:ID?

It seems we fixed the corresponding bug for key/keyref/unique in 1.1, but did not fix it for ID/IDREF.
Comment 1 David Ezell 2010-08-13 16:12:10 UTC
RESOLUTION: do the change as suggested in bug 10235, i.e. address ID/IDREF as we addressed key/keyref/unique.
Comment 2 Sandy Gao 2010-11-03 18:06:14 UTC
At the 2010-10-29 telecon, the WG adopted a fix for this bug shown in the following proposal:
 
http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.omni.20101029.html
  (member-only link)

The fix takes into account complex types with simple contents when determining whether ID/IDREF rules apply to a value.

Accordingly, I'm marking this issue as resolved.  Michael Kay, as the
originator of the bug report, you are invited to indicate either that you are
happy with the resolution of the issue (by changing the bug's status to CLOSED)
or else that you are not happy (by reopening it and explaining what's wrong). 
If we don't hear from you in two weeks, the WG will assume you are happy.