| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<xs:schema xmlns="ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="ns" > |
| 3 |
<xs:element name="data"> |
| 4 |
<xs:complexType> |
| 5 |
<xs:sequence> |
| 6 |
<xs:element name="decimal_value" type="Decimal_9_5" maxOccurs="unbounded"/> |
| 7 |
<xs:element name="celsiusBodyTemp" type="celsiusBodyTemp" minOccurs="0" maxOccurs="unbounded"/> |
| 8 |
<xs:element name="certification" type="year_attr_string_75" maxOccurs="unbounded"/> |
| 9 |
<xs:element name="menĂ¹" type="xs:string"/> |
| 10 |
<xs:element name="complex_boolean" type="TYPE_ATTR_BOOLEAN" minOccurs="0" maxOccurs="4"/> |
| 11 |
<xs:element name="simple_boolean" type="xs:boolean" minOccurs="0" maxOccurs="4"/> |
| 12 |
<xs:element name="date_and_time" type="xs:dateTime" minOccurs="0"/> |
| 13 |
<xs:element name="name" type="none_empty_string" minOccurs="0"/> |
| 14 |
<xs:element name="config" type="config" minOccurs="0"/> |
| 15 |
<xs:element name="dateTimeWithTZOffset" type="xs:dateTime" minOccurs="0"/> |
| 16 |
<xs:element name="duration" type="xs:duration" minOccurs="0"/> |
| 17 |
<xs:element name="hexbin" type="hexCode" minOccurs="0" /> |
| 18 |
<xs:element name="base64bin" type="base64Code" minOccurs="0" /> |
| 19 |
<xs:element name="list_of_floats" type="list_of_floats" minOccurs="0" /> |
| 20 |
<xs:element name="qname" type="xs:QName" minOccurs="0" /> |
| 21 |
</xs:sequence> |
| 22 |
</xs:complexType> |
| 23 |
</xs:element> |
| 24 |
|
| 25 |
<xs:simpleType name="Decimal_9_5"> |
| 26 |
<xs:restriction base="xs:decimal"> |
| 27 |
<xs:totalDigits value="9"/> |
| 28 |
<xs:fractionDigits value="5"/> |
| 29 |
</xs:restriction> |
| 30 |
</xs:simpleType> |
| 31 |
|
| 32 |
<xs:simpleType name='celsiusBodyTemp'> |
| 33 |
<xs:restriction base='xs:decimal'> |
| 34 |
<xs:totalDigits value='4'/> |
| 35 |
<xs:fractionDigits value='1'/> |
| 36 |
</xs:restriction> |
| 37 |
</xs:simpleType> |
| 38 |
|
| 39 |
<xs:simpleType name="string_75"> |
| 40 |
<xs:restriction base="xs:string"> |
| 41 |
<xs:maxLength value="75"/> |
| 42 |
</xs:restriction> |
| 43 |
</xs:simpleType> |
| 44 |
|
| 45 |
<xs:complexType name="year_attr_string_75"> |
| 46 |
<xs:simpleContent> |
| 47 |
<xs:extension base="string_75"> |
| 48 |
<xs:attribute name="Year" type="xs:integer"/> |
| 49 |
</xs:extension> |
| 50 |
</xs:simpleContent> |
| 51 |
</xs:complexType> |
| 52 |
|
| 53 |
<xs:complexType name="TYPE_ATTR_BOOLEAN"> |
| 54 |
<xs:simpleContent> |
| 55 |
<xs:extension base="xs:boolean"> |
| 56 |
<xs:attribute name="Type" type="xs:integer"/> |
| 57 |
</xs:extension> |
| 58 |
</xs:simpleContent> |
| 59 |
</xs:complexType> |
| 60 |
|
| 61 |
<!-- List types --> |
| 62 |
<xs:simpleType name="list_of_strings"> |
| 63 |
<xs:list itemType="xs:string"/> |
| 64 |
</xs:simpleType> |
| 65 |
|
| 66 |
<xs:simpleType name="list_of_integers"> |
| 67 |
<xs:list itemType="xs:integer"/> |
| 68 |
</xs:simpleType> |
| 69 |
|
| 70 |
<xs:simpleType name="list_of_floats"> |
| 71 |
<xs:list itemType="xs:float"/> |
| 72 |
</xs:simpleType> |
| 73 |
|
| 74 |
<xs:simpleType name="list_of_booleans"> |
| 75 |
<xs:list itemType="xs:boolean"/> |
| 76 |
</xs:simpleType> |
| 77 |
|
| 78 |
<!-- Union types --> |
| 79 |
<xs:simpleType name="integer_or_float"> |
| 80 |
<xs:union memberTypes="xs:integer xs:float"/> |
| 81 |
</xs:simpleType> |
| 82 |
|
| 83 |
<xs:simpleType name="integer_or_string"> |
| 84 |
<xs:union memberTypes="xs:integer xs:string"/> |
| 85 |
</xs:simpleType> |
| 86 |
|
| 87 |
<xs:simpleType name="boolean_or_integer_or_string"> |
| 88 |
<xs:union memberTypes="xs:boolean xs:integer xs:string"/> |
| 89 |
</xs:simpleType> |
| 90 |
|
| 91 |
<!-- For testing issue #63 --> |
| 92 |
<xs:simpleType name='hexCode'> |
| 93 |
<xs:restriction base='xs:hexBinary'> |
| 94 |
<xs:length value='4'/> |
| 95 |
</xs:restriction> |
| 96 |
</xs:simpleType> |
| 97 |
|
| 98 |
<xs:simpleType name='base64Code'> |
| 99 |
<xs:restriction base='xs:base64Binary'> |
| 100 |
<xs:minLength value='3'/> |
| 101 |
<xs:maxLength value='8'/> |
| 102 |
</xs:restriction> |
| 103 |
</xs:simpleType> |
| 104 |
|
| 105 |
<xs:simpleType name='base64Length4'> |
| 106 |
<xs:restriction base='xs:base64Binary'> |
| 107 |
<xs:length value='4'/> |
| 108 |
</xs:restriction> |
| 109 |
</xs:simpleType> |
| 110 |
|
| 111 |
<xs:simpleType name='base64Length5'> |
| 112 |
<xs:restriction base='xs:base64Binary'> |
| 113 |
<xs:length value='5'/> |
| 114 |
</xs:restriction> |
| 115 |
</xs:simpleType> |
| 116 |
|
| 117 |
<!-- For testing issue #64 --> |
| 118 |
<xs:simpleType name="none_empty_string"> |
| 119 |
<xs:restriction base="xs:string"> |
| 120 |
<xs:minLength value="1" /> |
| 121 |
</xs:restriction> |
| 122 |
</xs:simpleType> |
| 123 |
|
| 124 |
<xs:simpleType name="NameType"> |
| 125 |
<xs:restriction base="xs:string"> |
| 126 |
<xs:minLength value="1"/> |
| 127 |
<xs:maxLength value="255"/> |
| 128 |
</xs:restriction> |
| 129 |
</xs:simpleType> |
| 130 |
|
| 131 |
<!-- For testing issue #83 --> |
| 132 |
<xs:simpleType name="config"> |
| 133 |
<xs:restriction base="xs:string"> |
| 134 |
<xs:whiteSpace value="collapse"/> |
| 135 |
<xs:pattern value="(word|other)|(alternative)"/> |
| 136 |
</xs:restriction> |
| 137 |
</xs:simpleType> |
| 138 |
|
| 139 |
<!-- Issue #103 --> |
| 140 |
<xs:simpleType name="myType"> |
| 141 |
<xs:union memberTypes="typeA typeB"/> |
| 142 |
</xs:simpleType> |
| 143 |
|
| 144 |
<xs:simpleType name="typeA"> |
| 145 |
<xs:restriction base="xs:decimal"> |
| 146 |
<xs:minInclusive value="0.0"/> |
| 147 |
<xs:maxInclusive value="100.0"/> |
| 148 |
<xs:fractionDigits value="3"/> |
| 149 |
</xs:restriction> |
| 150 |
</xs:simpleType> |
| 151 |
|
| 152 |
<xs:simpleType name="typeB"> |
| 153 |
<xs:restriction base="xs:string"> |
| 154 |
<xs:pattern value="NaN"/> |
| 155 |
</xs:restriction> |
| 156 |
</xs:simpleType> |
| 157 |
|
| 158 |
<!-- For testing encoding --> |
| 159 |
<xs:simpleType name="mdate"> |
| 160 |
<xs:restriction base="xs:date"> |
| 161 |
<xs:minInclusive value="2000-01-01" /> |
| 162 |
</xs:restriction> |
| 163 |
</xs:simpleType> |
| 164 |
|
| 165 |
<xs:simpleType name="enum1"> |
| 166 |
<xs:restriction base="xs:string"> |
| 167 |
<xs:enumeration value="one"/> |
| 168 |
<xs:enumeration value="two"/> |
| 169 |
<xs:enumeration value="three"/> |
| 170 |
</xs:restriction> |
| 171 |
</xs:simpleType> |
| 172 |
|
| 173 |
</xs:schema> |