Sync with 5.4.1
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / xsd / complexTypes.xsd
CommitLineData
970ed795
EL
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3abe9331 3 Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
4
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
9 -->
10<schema xmlns="http://www.w3.org/2001/XMLSchema"
11xmlns:xs="http://www.w3.org/2001/XMLSchema"
12xmlns:ns="www.example.org"
13targetNamespace="www.example.org">
14
15<complexType name="e23">
16 <simpleContent>
17 <extension base="string">
18 <attribute name="foo" type="float"/>
19 <attribute name="bar" type="integer"/>
20 </extension>
21 </simpleContent>
22</complexType>
23
24<complexType name="e24">
25 <simpleContent>
26 <restriction base="ns:e23">
27 <length value="4"/>
28 </restriction>
29 </simpleContent>
30</complexType>
31
32<complexType name="e25seq">
33 <sequence>
34 <element name= "title" type="string"/>
35 <element name="forename" type="string"/>
36 <element name="surname" type="string"/>
37 </sequence>
38 <attribute name="gender" type="integer"/>
39 <attributeGroup ref="ns:g25attr2"/>
40</complexType>
41
42<annotation><documentation xml:lang="en">
43where g25attr1 is:
44</documentation></annotation>
45
46<attributeGroup name="g25attr2">
47 <attribute name="jobPosition" type="string"/>
48</attributeGroup>
49
50<annotation><documentation xml:lang="en">
51Now a type is defined that extends e25seq by adding a new element, group and attributes:
52</documentation></annotation>
53
54<complexType name="e26seq">
55 <complexContent>
56 <extension base="ns:e25seq">
57 <sequence>
58 <element name="age" type="integer"/>
59 <group ref="ns:g25seq"/>
60 </sequence>
61 <attribute name="unitOfAge" type="string"/>
62 <attributeGroup ref="ns:g25attr1"/>
63 </extension>
64 </complexContent>
65</complexType>
66
67<annotation><documentation xml:lang="en">
68where g25seq and g25attr1 are:
69</documentation></annotation>
70
71<group name="g25seq">
72 <sequence>
73 <element name="familyStatus" type="string"/>
74 <element name="spouseName" type="string" minOccurs="0"/>
75 </sequence>
76</group>
77
78<attributeGroup name="g25attr1">
79 <attribute name="birthPlace" type="string"/>
80 <attribute name="birthDate" type="string"/>
81</attributeGroup>
82
83<complexType name="e25cho">
84 <choice>
85 <element name="title" type="string"/>
86 <element name="forename" type="string"/>
87 <element name="surname" type="string"/>
88 </choice>
89 <attribute name="gender" type="string"/>
90</complexType>
91
92<annotation><documentation xml:lang="en">
93and
94</documentation></annotation>
95
96<complexType name="e26cho">
97 <complexContent>
98 <extension base="ns:e25cho">
99 <choice>
100 <element name="age" type="integer"/>
101 <element name="birthday" type="date"/>
102 </choice>
103 <attribute name="unitOfAge" type="string"/>
104 </extension>
105 </complexContent>
106</complexType>
107
108<complexType name="e27cho">
109 <complexContent>
110 <extension base="ns:e25seq">
111 <choice>
112 <element name="age" type="integer"/>
113 <element name="birthday" type="date"/>
114 </choice>
115 <attribute name="unitOfAge" type="string"/>
116 </extension>
117 </complexContent>
118</complexType>
119
120<complexType name="e27seq">
121 <complexContent>
122 <extension base="ns:e25cho">
123 <sequence>
124 <element name="age" type="integer"/>
125 </sequence>
126 <attribute name="unitOfAge" type="string"/>
127 </extension>
128 </complexContent>
129</complexType>
130
131<complexType name="X">
132 <sequence>
133 <element name="x" type="string"/>
134 <element name="y" minOccurs="0">
135 <complexType>
136 <complexContent>
137 <extension base="ns:X">
138 <sequence>
139 <element name="z" type="string"/>
140 </sequence>
141 </extension>
142 </complexContent>
143 </complexType>
144 </element>
145 </sequence>
146</complexType>
147
148<complexType name="e28">
149 <complexContent>
150 <restriction base="anyType">
151 <sequence>
152 <element name="size" type="nonPositiveInteger"/>
153 <element name="unit" type="NMTOKEN"/>
154 </sequence>
155 </restriction>
156 </complexContent>
157</complexType>
158
159
160<annotation><documentation xml:lang="EN">
161The base type is:
162</documentation></annotation>
163
164<element name="comment" type="string"/>
165
166<simpleType name="Items">
167 <restriction base="string">
168 </restriction>
169</simpleType>
170
171
172<complexType name="PurchaseOrderType">
173 <sequence>
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"/>
178 </sequence>
179 <attribute name="shipDate" type="date"/>
180 <attribute name="orderDate" type="date"/>
181</complexType>
182
183<annotation><documentation xml:lang="EN">
184The restricting type is:
185</documentation></annotation>
186
187<complexType name="RestrictedPurchaseOrderType">
188 <complexContent>
189 <restriction base="ns:PurchaseOrderType">
190 <sequence>
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"/>
195 </sequence>
196 <attribute name="shipDate" type="date" use="required" />
197 <attribute name="orderDate" type="date" use="prohibited" />
198 </restriction>
199 </complexContent>
200</complexType>
201
202<complexType name="e29">
203 <all>
204 <element name="foo" type="integer"/>
205 <element name="bar" type="float"/>
206 <element name="ding" type="string"/>
207 </all>
208</complexType>
209
210<complexType name="e29a">
211 <all minOccurs="0">
212 <element name="foo" type="integer"/>
213 <element name="bar" type="float"/>
214 <element name="ding" type="string"/>
215 </all>
216</complexType>
217
218<complexType name="e29b">
219 <all>
220 <element name="foo" type="integer"/>
221 <element name="bar" type="float" minOccurs="0"/>
222 <element name="ding" type="string"/>
223 </all>
224</complexType>
225
226<complexType name="e30">
227 <choice>
228 <element name="foo" type="integer"/>
229 <element name="bar" type="float"/>
230 </choice>
231</complexType>
232
233<group name="e31">
234 <sequence>
235 <element name="foo" type="string"/>
236 <element name="bar" type="string"/>
237 </sequence>
238</group>
239
240<complexType name="e32">
241 <choice>
242 <group ref="ns:e31"/>
243 <element name="ding" type="string"/>
244 </choice>
245</complexType>
246
247<complexType name="e33">
248 <choice>
249 <choice>
250 <element name="foo" type="string"/>
251 <element name="bar" type="string"/>
252 </choice>
253 <element name="ding" type="string"/>
254 </choice>
255</complexType>
256
257<complexType name="e34a">
258 <choice>
259 <sequence>
260 <element name="foo" type="string"/>
261 <element name="bar" type="string"/>
262 </sequence>
263 <element name="ding" type="string"/>
264 </choice>
265</complexType>
266
267<complexType name="e34b">
268 <choice>
269 <sequence>
270 <sequence>
271 <element name="foo" type="string"/>
272 <element name="bar" type="string"/>
273 </sequence>
274 <element name="ding" type="string"/>
275 <element name="foo" type="string"/>
276 <element name="bar" type="string"/>
277 </sequence>
278 <element name="ding" type="string"/>
279 </choice>
280</complexType>
281
282<complexType name="e35">
283 <choice>
284 <element name="foo" type="string"/>
285 <any namespace="other"/>
286 </choice>
287</complexType>
288
289<complexType name="e36a">
290 <sequence>
291 <element name="foo" type="integer"/>
292 <element name="bar" type="float"/>
293 </sequence>
294</complexType>
295
296<complexType name="e36b">
297 <sequence minOccurs="0">
298 <element name="foo" type="integer"/>
299 <element name="bar" type="float"/>
300 </sequence>
301</complexType>
302
303<complexType name="e36c">
304 <sequence minOccurs="0" maxOccurs="unbounded">
305 <element name="foo" type="integer"/>
306 <element name="bar" type="float"/>
307 </sequence>
308</complexType>
309
310<group name="e37">
311 <choice>
312 <element name="foo" type="string"/>
313 <element name="bar" type="string"/>
314 </choice>
315</group>
316
317<complexType name="e38">
318 <sequence>
319 <group ref="ns:e37"/>
320 <element name="ding" type="string"/>
321 </sequence>
322</complexType>
323
324<complexType name="e39">
325 <sequence>
326 <choice>
327 <element name="foo" type="string"/>
328 <element name="bar" type="string"/>
329 </choice>
330 <element name="ding" type="string"/>
331 </sequence>
332</complexType>
333
334<annotation><documentation xml:lang="EN"> CHECK THIS! </documentation></annotation>
335<complexType name="e40a">
336 <sequence>
337 <sequence>
338 <element name="foo" type="string"/>
339 <element name="bar" type="string"/>
340 </sequence>
341 <element name="ding" type="string"/>
342 </sequence>
343</complexType>
344
345<complexType name="e40b">
346 <sequence>
347 <sequence id="seq">
348 <element name="foo" type="string"/>
349 <element name="bar" type="string"/>
350 </sequence>
351 <choice id="cho">
352 <element name="foo" type="string"/>
353 <element name="bar" type="string"/>
354 </choice>
355 <element name="ding" type="string"/>
356 </sequence>
357</complexType>
358
359<complexType name="e40c">
360 <sequence>
361 <sequence minOccurs="0">
362 <element name="foo" type="string"/>
363 <element name="bar" type="string"/>
364 </sequence>
365 <choice>
366 <element name="foo" type="string"/>
367 <element name="bar" type="string"/>
368 </choice>
369 <element name="ding" type="string"/>
370 </sequence>
371</complexType>
372
373<complexType name="e40d">
374 <sequence>
375 <sequence minOccurs="0" maxOccurs="unbounded">
376 <element name="foo" type="string"/>
377 <element name="bar" type="string"/>
378 </sequence>
379 <choice>
380 <element name="foo" type="string"/>
381 <element name="bar" type="string"/>
382 </choice>
383 <element name="ding" type="string"/>
384 </sequence>
385</complexType>
386
387<complexType name="e41">
388 <sequence>
389 <element name="foo" type="string"/>
390 <any/>
391 </sequence>
392</complexType>
393
394<attributeGroup name="e42">
395 <attribute name="foo" type="float"/>
396 <attribute name="bar" type="float"/>
397</attributeGroup>
398
399<attributeGroup name="e43">
400 <attributeGroup ref="ns:e42"/>
401 <attribute name="ding" type="string"/>
402</attributeGroup>
403
404<complexType name="e44">
405 <sequence>
406 <element name="ding" type="string"/>
407 </sequence>
408 <attributeGroup ref="ns:e42"/>
409</complexType>
410
411<element name="MySeqMixed">
412 <complexType mixed="true">
413 <sequence>
414 <element name="a" type="string"/>
415 <element name="b" type="boolean"/>
416 </sequence>
417 <attribute name="attrib" type="integer"/>
418 </complexType>
419</element>
420
421<complexType name="MyChoMixed" mixed="true">
422 <choice>
423 <element name="a" type="string"/>
424 <element name="b" type="boolean"/>
425 </choice>
426</complexType>
427
428<complexType name="MyAllMixed" mixed="true">
429 <all>
430 <element name="a" type="string"/>
431 <element name="b" type="boolean"/>
432 </all>
433</complexType>
434
435<complexType name="MyComplexType-16">
436 <sequence maxOccurs="unbounded" minOccurs="0">
437 <element name="a" type="string"/>
438 <element name="b" type="boolean"/>
439 </sequence>
440</complexType>
441
442<complexType name="MyComplexType-13" mixed="true">
443 <all>
444 <element name="a" type="string"/>
445 <element name="b" type="boolean"/>
446 </all>
447</complexType>
448
449<complexType name="MyComplexType-15" mixed="true">
450 <all minOccurs="0">
451 <element name="a" type="string"/>
452 <element name="b" type="boolean"/>
453 </all>
454</complexType>
455
456<complexType name="MyComplexType-14" mixed="true">
457 <choice>
458 <element name="a" type="string"/>
459 <element name="b" type="boolean"/>
460 </choice>
461</complexType>
462
463
464
465</schema>
This page took 0.042043 seconds and 5 git commands to generate.