Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: extension adds element removed by restriction (3.4.6/1.5) >Thread Next - using types from an included file in a different namespace RE: extension adds element removed by restriction (3.4.6/1.5)To: <xmlschema-dev@--.---> Date: 10/25/2006 9:13:00 PM
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>
From cmsmcq@a... Thu Oct 26 18:04:31 2006
Received: from maggie.w3.org ([193.51.208.68 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
