Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: [ANN] XSDBench XML Schema Benchmark 1.0.0 released >Thread Next - Re: extension adds element removed by restriction (3.4.6/1.5) extension adds element removed by restriction (3.4.6/1.5)To: <xmlschema-dev@--.---> Date: 10/23/2006 5:59:00 AM
In 3.4.6 (Constraints on Complex Type Definition Schema
Components) Section 1.5 there is this comment:
Note: This requirement ensures that nothing removed by a
restriction is subsequently added back by an extension.
The following schema is accepted by three schema validators.
I would expect gamma to be rejected because it adds back
element "b" which was removed when beta was created
from alpha.
I would appreciate it if someone would explain why this
does not violate 3.4.6 section 1.5.
Thanks.
<xs:complexType name="alpha">
<xs:sequence>
<xs:element name="a" />
<xs:element name="b" minOccurs="0" />
</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" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
From cmsmcq@a... Tue Oct 24 01:47:05 2006
Received: from lisa.w3.org ([128.30.52.41 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
