- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 29 Mar 2007 20:25:02 +0000
- To: www-xml-schema-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4438
Summary: Restriction then extension
Product: XML Schema
Version: 1.1 only
Platform: All
OS/Version: All
Status: NEW
Keywords: unclassified
Severity: normal
Priority: P2
Component: Structures: XSD Part 1
AssignedTo: cmsmcq@w3.org
ReportedBy: sandygao@ca.ibm.com
QAContact: www-xml-schema-comments@w3.org
Consider
<xs:complexType name="base">
<xs:sequence>
<xs:element name="dummy"/>
<xs:element name="e" type="xs:string" fixed="abc" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="restriction">
<xs:complexContent>
<xs:restriction bsae="base">
<xs:sequence>
<xs:element name="dummy"/>
</xs:sequence>
<xs:restriction>
<xs:complexContent>
</xs:complexType>
<xs:complexType name="extension">
<xs:complexContent>
<xs:extension bsae="restriction">
<xs:sequence>
<xs:element name="e" type="xs:string" fixed="def" minOccurs="0"/>
</xs:sequence>
<xs:restriction>
<xs:complexContent>
</xs:complexType>
Note the different "fixed" values.
Schema 1.0 has a rule like "all derivation can be done by doing all extensions
first and restriction later". This makes the above invalid. Schema 1.1 plans to
abandon this rule, which would allowed the above derivation. Should it be
allowed?
Received on Thursday, 29 March 2007 20:25:08 UTC