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 4617 - SML Schema: The refer attribute in sml:keyref should be optional
Summary: SML Schema: The refer attribute in sml:keyref should be optional
Alias: None
Product: SML
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: All All
: P1 normal
Target Milestone: Second draft
Assignee: Valentina Popescu
QA Contact: SML Working Group discussion list
Keywords: editorial
Depends on:
Blocks: 4692
  Show dependency treegraph
Reported: 2007-06-10 01:17 UTC by Pratul Dublish
Modified: 2007-08-28 04:06 UTC (History)
0 users

See Also:


Description Pratul Dublish 2007-06-10 01:17:24 UTC
The refer attribute in SML Schema (Appendix I) should be optional since a keyref can use the local ref attribute to reuse the definition of another keyref. In this case, the keyref has no need to use the refer attribute to refer to an sml:key or sml:unique definition.
Comment 1 Bassam Tabbara 2007-06-28 00:29:02 UTC
The refer attribute is aligned with xs:keyref which is "required". What is the use case for defining a sml:keyref that does not have a refer attribute set?
Comment 2 Bassam Tabbara 2007-06-28 01:50:15 UTC
Sorry I just reread this and made more sense of it. 

Why do we need to support the "ref" attribute on sml:key/unique/keyref? Its not currently supported in xsd:key/unique/keyref? I would prefer to align with XML Schema here and:
1) Remove the "ref" attribute from sml:keybase
2) Leave "refere" on sml:keyref as "required"
Comment 3 Sandy Gao 2007-07-05 14:21:08 UTC
If an element declaration E1 for the name "e" appears in a complex type D, who is a restriction of B, and B also includes an element declaration E2 for "e", then schema requires that E1's {identity constraints} is a superset of that of E2. If one can't reuse identity constraints (by having a "ref" attribute), as soon as B includes a local E2 with IDCs, it's not possible to restrict B.

Schema 1.0 had this problem, which makes restriction hard to use. Schema 1.1 will introduce an "ref" attribute on key/keyref/unique, so that E1 can now reuse E2's identity constraints, to satisfy the constraint mentioned above.

The proposed change to SML was motivated by the schema 1.1 direction.
Comment 4 Bassam Tabbara 2007-07-26 15:30:55 UTC
Sounds reasonable. Thanks for the clarification Sandy.
Comment 5 Valentina Popescu 2007-08-28 04:06:45 UTC
updated sml-source.xml and sml-source.xsd to make refer attribute optional