blob: 533551ea740dfdbb27c3ed858516263b00c1fe8a [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/mytest"
targetNamespace="http://openuri.org/mytest"
elementFormDefault="qualified"
attributeFormDefault="unqualified" >
<xs:complexType name="person">
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:choice maxOccurs="unbounded">
<xs:element name="number">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="1000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="birthday" type="xs:date"/>
</xs:choice>
<xs:element name="hex" type="xs:hexBinary"/>
<xs:element name="base64" type="xs:base64Binary"/>
</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:attribute name="hexAtt">
<xs:simpleType>
<xs:restriction base="xs:hexBinary">
<xs:pattern value="([45][0-9A-F])*"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base64Att">
<xs:simpleType>
<xs:restriction base="xs:base64Binary">
<xs:whiteSpace value="collapse"/>
<xs:enumeration value="VGhpcyBzdHJpbmcgaXMgYmFzZTY0QmluYXJ5IGVuY29kZWQh"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:element name="customer" type="mt:person"/>
<xs:element name="employee">
<xs:complexType>
<xs:complexContent>
<xs:extension base="mt:person">
<xs:sequence>
<xs:element name="eid" type="xs:int"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>