poi/xmlbeans/test/cases/xbean/scomp/derivation/MixedContentRestriction.xsd
2018-02-16 22:41:27 +00:00

60 lines
2.2 KiB
XML

<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://xbean/scomp/derivation/MixedContentRestriction"
targetNamespace="http://xbean/scomp/derivation/MixedContentRestriction"
>
<!--sequence group needs to be optional for mixed2SimpleT and mixed2EmptyT-->
<xsd:complexType name="baseMixedT" mixed="true">
<xsd:sequence minOccurs="0">
<xsd:element name="child1" type="xsd:integer"/>
<xsd:element name="child2" type="xsd:integer"/>
<xsd:element name="child3" type="xsd:integer" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!--mixed is not inherited from base type-->
<xsd:complexType name="restrictedEltT">
<xsd:complexContent>
<xsd:restriction base="baseMixedT">
<xsd:sequence>
<xsd:element name="child1" type="xsd:integer"/>
<xsd:element name="child2" type="xsd:integer"/>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="restrictedMixedT" mixed="true">
<xsd:complexContent>
<xsd:restriction base="baseMixedT">
<xsd:sequence>
<xsd:element name="child1" type="xsd:integer"/>
<xsd:element name="child2" type="xsd:integer"/>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!--
<xsd:complexType name="mixed2SimpleT" mixed="true">
<xsd:simpleContent>
<xsd:restriction base="baseMixedT">
<xsd:simpleType>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="Mixed2SimpleElt" type="mixed2SimpleT"/>
-->
<xsd:complexType name="mixed2EmptyT">
<xsd:complexContent>
<xsd:restriction base="baseMixedT"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="ElementOnlyElt" type="restrictedEltT"/>
<xsd:element name="MixedElt" type="restrictedMixedT"/>
<xsd:element name="Mixed2EmptyElt" type="mixed2EmptyT"/>
</xsd:schema>