1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2000-2015 Ericsson Telecom AB
5 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Eclipse Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/epl-v10.html
10 <schema xmlns="http://www.w3.org/2001/XMLSchema"
11 xmlns:xs="http://www.w3.org/2001/XMLSchema"
12 xmlns:ns="www.example.org"
13 targetNamespace="www.example.org">
15 <complexType name="e23">
17 <extension base="string">
18 <attribute name="foo" type="float"/>
19 <attribute name="bar" type="integer"/>
24 <complexType name="e24">
26 <restriction base="ns:e23">
32 <complexType name="e25seq">
34 <element name= "title" type="string"/>
35 <element name="forename" type="string"/>
36 <element name="surname" type="string"/>
38 <attribute name="gender" type="integer"/>
39 <attributeGroup ref="ns:g25attr2"/>
42 <annotation><documentation xml:lang="en">
44 </documentation></annotation>
46 <attributeGroup name="g25attr2">
47 <attribute name="jobPosition" type="string"/>
50 <annotation><documentation xml:lang="en">
51 Now a type is defined that extends e25seq by adding a new element, group and attributes:
52 </documentation></annotation>
54 <complexType name="e26seq">
56 <extension base="ns:e25seq">
58 <element name="age" type="integer"/>
59 <group ref="ns:g25seq"/>
61 <attribute name="unitOfAge" type="string"/>
62 <attributeGroup ref="ns:g25attr1"/>
67 <annotation><documentation xml:lang="en">
68 where g25seq and g25attr1 are:
69 </documentation></annotation>
73 <element name="familyStatus" type="string"/>
74 <element name="spouseName" type="string" minOccurs="0"/>
78 <attributeGroup name="g25attr1">
79 <attribute name="birthPlace" type="string"/>
80 <attribute name="birthDate" type="string"/>
83 <complexType name="e25cho">
85 <element name="title" type="string"/>
86 <element name="forename" type="string"/>
87 <element name="surname" type="string"/>
89 <attribute name="gender" type="string"/>
92 <annotation><documentation xml:lang="en">
94 </documentation></annotation>
96 <complexType name="e26cho">
98 <extension base="ns:e25cho">
100 <element name="age" type="integer"/>
101 <element name="birthday" type="date"/>
103 <attribute name="unitOfAge" type="string"/>
108 <complexType name="e27cho">
110 <extension base="ns:e25seq">
112 <element name="age" type="integer"/>
113 <element name="birthday" type="date"/>
115 <attribute name="unitOfAge" type="string"/>
120 <complexType name="e27seq">
122 <extension base="ns:e25cho">
124 <element name="age" type="integer"/>
126 <attribute name="unitOfAge" type="string"/>
131 <complexType name="X">
133 <element name="x" type="string"/>
134 <element name="y" minOccurs="0">
137 <extension base="ns:X">
139 <element name="z" type="string"/>
148 <complexType name="e28">
150 <restriction base="anyType">
152 <element name="size" type="nonPositiveInteger"/>
153 <element name="unit" type="NMTOKEN"/>
160 <annotation><documentation xml:lang="EN">
162 </documentation></annotation>
164 <element name="comment" type="string"/>
166 <simpleType name="Items">
167 <restriction base="string">
172 <complexType name="PurchaseOrderType">
174 <element name="shipTo" type="string"/>
175 <element name="billTo" type="string"/>
176 <element ref="ns:comment" minOccurs="0"/>
177 <element name="items" type="ns:Items"/>
179 <attribute name="shipDate" type="date"/>
180 <attribute name="orderDate" type="date"/>
183 <annotation><documentation xml:lang="EN">
184 The restricting type is:
185 </documentation></annotation>
187 <complexType name="RestrictedPurchaseOrderType">
189 <restriction base="ns:PurchaseOrderType">
191 <element name="shipTo" type="string"/>
192 <element name="billTo" type="string"/>
193 <element ref="ns:comment" minOccurs="1"/>
194 <element name="items" type="ns:Items"/>
196 <attribute name="shipDate" type="date" use="required" />
197 <attribute name="orderDate" type="date" use="prohibited" />
202 <complexType name="e29">
204 <element name="foo" type="integer"/>
205 <element name="bar" type="float"/>
206 <element name="ding" type="string"/>
210 <complexType name="e29a">
212 <element name="foo" type="integer"/>
213 <element name="bar" type="float"/>
214 <element name="ding" type="string"/>
218 <complexType name="e29b">
220 <element name="foo" type="integer"/>
221 <element name="bar" type="float" minOccurs="0"/>
222 <element name="ding" type="string"/>
226 <complexType name="e30">
228 <element name="foo" type="integer"/>
229 <element name="bar" type="float"/>
235 <element name="foo" type="string"/>
236 <element name="bar" type="string"/>
240 <complexType name="e32">
242 <group ref="ns:e31"/>
243 <element name="ding" type="string"/>
247 <complexType name="e33">
250 <element name="foo" type="string"/>
251 <element name="bar" type="string"/>
253 <element name="ding" type="string"/>
257 <complexType name="e34a">
260 <element name="foo" type="string"/>
261 <element name="bar" type="string"/>
263 <element name="ding" type="string"/>
267 <complexType name="e34b">
271 <element name="foo" type="string"/>
272 <element name="bar" type="string"/>
274 <element name="ding" type="string"/>
275 <element name="foo" type="string"/>
276 <element name="bar" type="string"/>
278 <element name="ding" type="string"/>
282 <complexType name="e35">
284 <element name="foo" type="string"/>
285 <any namespace="other"/>
289 <complexType name="e36a">
291 <element name="foo" type="integer"/>
292 <element name="bar" type="float"/>
296 <complexType name="e36b">
297 <sequence minOccurs="0">
298 <element name="foo" type="integer"/>
299 <element name="bar" type="float"/>
303 <complexType name="e36c">
304 <sequence minOccurs="0" maxOccurs="unbounded">
305 <element name="foo" type="integer"/>
306 <element name="bar" type="float"/>
312 <element name="foo" type="string"/>
313 <element name="bar" type="string"/>
317 <complexType name="e38">
319 <group ref="ns:e37"/>
320 <element name="ding" type="string"/>
324 <complexType name="e39">
327 <element name="foo" type="string"/>
328 <element name="bar" type="string"/>
330 <element name="ding" type="string"/>
334 <annotation><documentation xml:lang="EN"> CHECK THIS! </documentation></annotation>
335 <complexType name="e40a">
338 <element name="foo" type="string"/>
339 <element name="bar" type="string"/>
341 <element name="ding" type="string"/>
345 <complexType name="e40b">
348 <element name="foo" type="string"/>
349 <element name="bar" type="string"/>
352 <element name="foo" type="string"/>
353 <element name="bar" type="string"/>
355 <element name="ding" type="string"/>
359 <complexType name="e40c">
361 <sequence minOccurs="0">
362 <element name="foo" type="string"/>
363 <element name="bar" type="string"/>
366 <element name="foo" type="string"/>
367 <element name="bar" type="string"/>
369 <element name="ding" type="string"/>
373 <complexType name="e40d">
375 <sequence minOccurs="0" maxOccurs="unbounded">
376 <element name="foo" type="string"/>
377 <element name="bar" type="string"/>
380 <element name="foo" type="string"/>
381 <element name="bar" type="string"/>
383 <element name="ding" type="string"/>
387 <complexType name="e41">
389 <element name="foo" type="string"/>
394 <attributeGroup name="e42">
395 <attribute name="foo" type="float"/>
396 <attribute name="bar" type="float"/>
399 <attributeGroup name="e43">
400 <attributeGroup ref="ns:e42"/>
401 <attribute name="ding" type="string"/>
404 <complexType name="e44">
406 <element name="ding" type="string"/>
408 <attributeGroup ref="ns:e42"/>
411 <element name="MySeqMixed">
412 <complexType mixed="true">
414 <element name="a" type="string"/>
415 <element name="b" type="boolean"/>
417 <attribute name="attrib" type="integer"/>
421 <complexType name="MyChoMixed" mixed="true">
423 <element name="a" type="string"/>
424 <element name="b" type="boolean"/>
428 <complexType name="MyAllMixed" mixed="true">
430 <element name="a" type="string"/>
431 <element name="b" type="boolean"/>
435 <complexType name="MyComplexType-16">
436 <sequence maxOccurs="unbounded" minOccurs="0">
437 <element name="a" type="string"/>
438 <element name="b" type="boolean"/>
442 <complexType name="MyComplexType-13" mixed="true">
444 <element name="a" type="string"/>
445 <element name="b" type="boolean"/>
449 <complexType name="MyComplexType-15" mixed="true">
451 <element name="a" type="string"/>
452 <element name="b" type="boolean"/>
456 <complexType name="MyComplexType-14" mixed="true">
458 <element name="a" type="string"/>
459 <element name="b" type="boolean"/>