blob: 9a0b97c22befc9a13b42841674cbc327217cead6 [file] [log] [blame]
<?xml version="1.0"?>
<!-- =========================================================================
Test Type : Schema Valid ( <element> )
Description: Tests valid substitutionGroup= for <element>s with valid derived
<simpleType> definitions.
========================================================================== -->
<schema xmlns ="http://www.w3.org/2001/XMLSchema"
xmlns:sv ="http://www.schemaTest.org/m3_3v"
targetNamespace="http://www.schemaTest.org/m3_3v">
<element name="Magazine" type="sv:strMin5" substitutionGroup="sv:Book"/>
<element name="Book" type="string"/>
<element name="Periodical" type="sv:strMin10" substitutionGroup="sv:Magazine"/>
<element name="Newsletter" substitutionGroup="sv:Magazine">
<simpleType>
<restriction base="sv:strMin5">
<minLength value="15"/>
</restriction>
</simpleType>
</element>
<simpleType name="strMin5">
<restriction base="string">
<minLength value="5"/>
</restriction>
</simpleType>
<simpleType name="strMin10">
<restriction base="sv:strMin5">
<minLength value="10"/>
</restriction>
</simpleType>
<element name="Library">
<complexType>
<sequence>
<element ref="sv:Periodical"/>
<element ref="sv:Magazine" minOccurs="3" maxOccurs="3"/>
<element ref="sv:Book" minOccurs="4" maxOccurs="4"/>
<element ref="sv:Newsletter"/>
</sequence>
</complexType>
</element>
</schema>