Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | |
d44e3c4f | 3 | Copyright (c) 2000-2016 Ericsson Telecom AB |
970ed795 EL |
4 | All rights reserved. This program and the accompanying materials |
5 | are made available under the terms of the Eclipse Public License v1.0 | |
6 | which accompanies this distribution, and is available at | |
7 | http://www.eclipse.org/legal/epl-v10.html | |
d44e3c4f | 8 | |
9 | Contributors: | |
10 | Balasko, Jeno | |
11 | Raduly, Csaba | |
12 | --> | |
970ed795 EL |
13 | <schema xmlns="http://www.w3.org/2001/XMLSchema" |
14 | xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
15 | xmlns:ns="www.example.org/list" | |
16 | targetNamespace="www.example.org/list"> | |
17 | ||
18 | <!-- helper union types --> | |
19 | <xsd:simpleType name="myUnionAttr"> | |
20 | <xsd:union memberTypes="xsd:integer xsd:boolean"/> | |
21 | </xsd:simpleType> | |
22 | ||
23 | <xsd:simpleType name="myUnionChildren"> | |
24 | <xsd:union> | |
25 | <xsd:simpleType> | |
26 | <xsd:restriction base="string"/> | |
27 | </xsd:simpleType> | |
28 | <xsd:simpleType> | |
29 | <xsd:restriction base="float"/> | |
30 | </xsd:simpleType> | |
31 | </xsd:union> | |
32 | </xsd:simpleType> | |
33 | ||
34 | ||
35 | ||
36 | <!-- list defined by itemType attribute --> | |
37 | <xsd:simpleType name="listByAttribute"> | |
38 | <xsd:list itemType="xsd:integer"/> | |
39 | </xsd:simpleType> | |
40 | ||
41 | ||
42 | <!-- list defined by atomic child element --> | |
43 | <xsd:simpleType name="listByAtomicChild"> | |
44 | <xsd:list> | |
45 | <xsd:simpleType> | |
46 | <xsd:restriction base="xsd:float"/> | |
47 | </xsd:simpleType> | |
48 | </xsd:list> | |
49 | </xsd:simpleType> | |
50 | ||
51 | <!-- list defined by unnamed union child element --> | |
52 | <xsd:simpleType name="listByUnionAttribChild"> | |
53 | <xsd:list> | |
54 | <xsd:simpleType> | |
55 | <xsd:union memberTypes="xsd:integer xsd:boolean"/> | |
56 | </xsd:simpleType> | |
57 | </xsd:list> | |
58 | </xsd:simpleType> | |
59 | ||
60 | <!-- list defined by named union child element --> | |
61 | <xsd:simpleType name="listByUnionElemChild"> | |
62 | <xsd:list> | |
63 | <xsd:simpleType> | |
64 | <xsd:union> | |
65 | <xsd:simpleType> | |
66 | <xsd:restriction base="string"/> | |
67 | </xsd:simpleType> | |
68 | <xsd:simpleType> | |
69 | <xsd:restriction base="float"/> | |
70 | </xsd:simpleType> | |
71 | </xsd:union> | |
72 | </xsd:simpleType> | |
73 | </xsd:list> | |
74 | </xsd:simpleType> | |
75 | ||
76 | <!-- lists defined by refernced unnamed union child element --> | |
77 | <xsd:simpleType name="listByAttributeRef1"> | |
78 | <xsd:list itemType="ns:myUnionAttr"/> | |
79 | </xsd:simpleType> | |
80 | ||
81 | <xsd:simpleType name="listByAttributeRef2"> | |
82 | <xsd:list itemType="ns:myUnionChildren"/> | |
83 | </xsd:simpleType> | |
84 | ||
d44e3c4f | 85 | </schema> |