poi/xmlbeans/test/cases/xbean/compile/scomp/simple/person.xsd
2018-02-16 22:41:27 +00:00

66 lines
2.0 KiB
XML
Executable File

<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>