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 5263 - Errors in the S4SD
Summary: Errors in the S4SD
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows XP
: P1 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: S4SD cluster
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2007-11-12 10:34 UTC by Michael Kay
Modified: 2008-02-08 23:38 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-11-12 10:34:07 UTC
In the schema for schema documents published as Appendix A, there are three references to types that are missing the xs: prefix.

(a) in

  <xs:complexType name="assertion">
    <xs:complexContent>
      <xs:extension base="xs:annotated">       
        <xs:attribute name="test" type="string"/>
        <xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

the first attribute should have type="xs:string"

(b) in 

  <xs:complexType name="altType">
    <xs:annotation>
      <xs:documentation>
        This type is used for 'alternative' elements.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="xs:annotated">
        <xs:choice minOccurs="0">
          <xs:element ref="xs:simpleType"/>
          <xs:element ref="xs:complexType"/>
        </xs:choice>
        <xs:attribute name="test" type="string" use="optional"/>
        <xs:attribute name="type" type="QName" use="optional"/>
        <xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/>
        <xs:attribute name="id" type="xs:ID"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

the first two attributes should have type xs:string and xs:QName respectively.
Comment 1 Michael Kay 2007-11-12 10:46:14 UTC
Furthermore, in the definition of altType, the definition of the id attribute should be removed, because it is a duplicate (it is already present in the type being extended).

(Actually, the spec is open to interpretation here. The set of attribute uses is formed as a union of the attribute uses defined on the base type and the extended type, and the concept of union depends on the concept of component identity which is not clearly defined. If the two attribute uses are considered to be identical, then the union contains only one copy, so there is no error. But the validity of the S4SD shouldn't depend on this interpretation.)
Comment 2 C. M. Sperberg-McQueen 2008-02-08 02:20:08 UTC
A wording proposal including changes for this issue went to the WG
on 7 February 2008:

  http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.consent.200801.html#composition

(member-only link).
Comment 3 C. M. Sperberg-McQueen 2008-02-08 23:38:56 UTC
The wording proposal mentioned in comment #2 was accepted by the
WG today.  Accordingly, I'm marking this issue resolved.

Michael, if you would check to make sure the changes do resolve
the problem, and indicate your result by either closing or
reopening the issue, it would be helpful.  Thanks.