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 5053 - S4S: Issues on the complex type definition "altType"
Summary: S4S: Issues on the complex type definition "altType"
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: All All
: 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-09-15 11:54 UTC by Paolo Marinelli
Modified: 2008-02-09 09:22 UTC (History)
0 users

See Also:


Attachments

Description Paolo Marinelli 2007-09-15 11:54:51 UTC
Within the Schema for Schema documents [1], type altType is defined as follows: 

<xs:complexType name="altType">
    ...
    <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 content model references the global element declarations simpleType and complexType. Such global declarations are used to validate the simple and complex types defined at the top-level of a schema document. So, both of them requires the attribute name. On the other hand, I think that unnamed type definitions only should be allowed within an <alternative> element. 

Moreover, type altType explicitly declares an attribute id of type ID. But such an attribute is also inherited from the base type annotated. 

See also bug 5052.


References
[1]: http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/#normative-schemaSchema
Comment 1 C. M. Sperberg-McQueen 2008-02-08 02:20:00 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 2 C. M. Sperberg-McQueen 2008-02-08 19:56:01 UTC
The 'Structures Omnibus 1' proposal mentioned in an earlier comment
was adopted by the XML Schema Working Group today.

http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.consent.200801.html (member-only link)

The XML Schema WG believes that the changes adopted today resolve this
issue fully.  I'm changing its status accordingly.

The change in status should cause email to be sent to the originator of
this issue, to whom the following request is addressed.

Please review the changes adopted and let us know if you agree with this resolution of your issue, by adding a comment to the issue record and changing the Status of the issue to Closed. Or, if you do not agree with this resolution, please add a comment explaining why. If you wish to appeal the WG's decision to the Director, then also change the Status of the record to Reopened. If you wish to record your dissent, but do not wish to appeal the decision to the Director, then change the Status of the record to Closed. If we do not hear from you in the next two weeks, we will assume you agree with the WG decision.
Comment 3 Paolo Marinelli 2008-02-09 09:22:33 UTC
I reviewed the resolution, and I agree with it. 

Thank you. 

Paolo