Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: extension adds element removed by restriction (3.4.6/1.5)

From: "Moog, Thomas H" <thomas.h.moog@-----.--->
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent