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 16779 - S4S has constraint that does not allow ID constraints with "ref" attributes
Summary: S4S has constraint that does not allow ID constraints with "ref" attributes
Status: NEW
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: needsAgreement
Depends on:
Blocks:
 
Reported: 2012-04-18 15:15 UTC by Priscilla Walmsley
Modified: 2012-04-20 16:04 UTC (History)
1 user (show)

See Also:


Attachments

Description Priscilla Walmsley 2012-04-18 15:15:33 UTC
The following constraint from the Schema for Schemas assumes that all key, unique and keyref elements have names. 

    <xs:key name="identityConstraint">
      <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
      <xs:field xpath="@name"/>
    </xs:key>

This is no longer a valid assumption, since they can now have the "ref" attribute instead. I think it should be changed from key to unique, as in:

    <xs:unique name="identityConstraint">
      <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
      <xs:field xpath="@name"/>
    </xs:unique>
Comment 1 David Ezell 2012-04-20 16:04:38 UTC
From the WG call 2012-04-20:
SG: I'm worried that we should put something to constrain this in the rec.
MSM: the closest I see to this constraint is 3.11.1.
SG: 3.17.6.1 is the place where we spell it all out.