- From: Moog, Thomas H <thomas.h.moog@intel.com>
- Date: Thu, 26 Oct 2006 01:12:45 -0400
- To: <xmlschema-dev@w3.org>
Can someone give me an example of a sequence of
restrictions and extensions which *cannot* be
represented in the canonical form described in
Section 3.6 (that is, one restriction followed by
one extension (possibly empty), followed by one
restriction (possibly empty) ?
There is a rule which requires that all element
in a model group with the same name have the
same type (Section 3.8.1).
In the case of complexType alpha with element
"b" of type xs:gYear and complexType gamma with
element "b" of type xs:integer, would this be
a violation of that rule ? I suspect not as
alpha's "b" cannot be present when gamma's "b"
is present.
<xs:complexType name="alpha">
<xs:sequence>
<xs:element name="a" />
<xs:element name="b" minOccurs="0" type="xs:gYear" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="beta" >
<xs:complexContent>
<xs:restriction base="alpha" >
<xs:sequence>
<xs:element name="a" />
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="gamma" >
<xs:complexContent>
<xs:extension base="beta" >
<xs:sequence>
<xs:element name="b" type="xs:integer" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Received on Thursday, 26 October 2006 05:13:01 UTC