blob: 59db0d06c18c79f19c2acbe509efa6f22d1714c3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mt="http://openuri.org/typesonly"
targetNamespace="http://openuri.org/typesonly"
elementFormDefault="qualified"
attributeFormDefault="unqualified" >
<xs:complexType name="person">
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:choice>
<xs:element name="age">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="birthday" type="xs:date"/>
</xs:choice>
<xs:element minOccurs="0" maxOccurs="unbounded" type="mt:person" name="child"/>
</xs:sequence>
<xs:attribute name="gender">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="male"/>
<xs:enumeration value="female"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:element name="record" type="mt:person"/>
<xs:simpleType name="State">
<xs:restriction base="xs:string">
<xs:enumeration value="AK"/>
<xs:enumeration value="AL"/>
<xs:enumeration value="AS"/>
<xs:enumeration value="AZ"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ListOfStates">
<xs:list itemType="mt:State"/>
</xs:simpleType>
<xs:complexType name="candidate">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="states" type="mt:ListOfStates"/>
</xs:sequence>
</xs:complexType>
</xs:schema>