1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/tagging-preset-1.0" |
---|
3 | xmlns:tns="http://josm.openstreetmap.de/tagging-preset-1.0" elementFormDefault="qualified"> |
---|
4 | |
---|
5 | <!-- |
---|
6 | Localized attributes (for example de.description are not supported by |
---|
7 | xsd, so every element needs <anyAttribute/> |
---|
8 | To cover at least some common errors, elements have specified prohibited attributes |
---|
9 | --> |
---|
10 | |
---|
11 | <element name="annotations" type="tns:root"/> |
---|
12 | <element name="presets" type="tns:root"/> |
---|
13 | |
---|
14 | <complexType name="root"> |
---|
15 | <complexContent> |
---|
16 | <extension base="tns:group"> |
---|
17 | <attribute name="author" type="string" /> |
---|
18 | <attribute name="version" type="string" /> |
---|
19 | <attribute name="shortdescription" type="string" /> |
---|
20 | <attribute name="description" type="string" /> |
---|
21 | <attribute name="link" type="string"/> |
---|
22 | |
---|
23 | <anyAttribute processContents="skip"/> |
---|
24 | </extension> |
---|
25 | </complexContent> |
---|
26 | </complexType> |
---|
27 | |
---|
28 | <complexType name="group"> |
---|
29 | <sequence> |
---|
30 | <choice minOccurs="1" maxOccurs="unbounded"> |
---|
31 | <element name="group" type="tns:group" /> |
---|
32 | <element name="item" type="tns:item" /> |
---|
33 | <element name="separator" type="tns:separator" /> |
---|
34 | </choice> |
---|
35 | </sequence> |
---|
36 | <attribute name="name" type="string" /> |
---|
37 | <attribute name="icon" type="string" /> |
---|
38 | |
---|
39 | <attribute name="type" use="prohibited"/> |
---|
40 | <attribute name="text" use="prohibited"/> |
---|
41 | <anyAttribute processContents="skip"/> |
---|
42 | </complexType> |
---|
43 | |
---|
44 | <complexType name="separator" /> |
---|
45 | |
---|
46 | <complexType name="item"> |
---|
47 | <sequence> |
---|
48 | <choice minOccurs="0" maxOccurs="unbounded"> |
---|
49 | <group ref="tns:optional_elements" /> |
---|
50 | <element name="key" type="tns:key" /> |
---|
51 | <element name="optional" type="tns:optional" minOccurs="0" /> |
---|
52 | </choice> |
---|
53 | <element name="roles" type="tns:roles" minOccurs="0" /> |
---|
54 | </sequence> |
---|
55 | <attribute name="name" type="string" /> |
---|
56 | <attribute name="icon" type="string" /> |
---|
57 | <attribute name="type" type="string" /> |
---|
58 | |
---|
59 | <attribute name="text" use="prohibited"/> |
---|
60 | <anyAttribute processContents="skip"/> |
---|
61 | </complexType> |
---|
62 | |
---|
63 | <complexType name="optional"> |
---|
64 | <group ref="tns:optional_elements" maxOccurs="unbounded" /> |
---|
65 | </complexType> |
---|
66 | |
---|
67 | <group name="optional_elements"> |
---|
68 | <choice> |
---|
69 | <element name="label" type="tns:label" /> |
---|
70 | <element name="space" type="tns:space" /> |
---|
71 | <element name="link" type="tns:link" /> |
---|
72 | <element name="text" type="tns:text" /> |
---|
73 | <element name="combo" type="tns:combo" /> |
---|
74 | <element name="check" type="tns:check" /> |
---|
75 | </choice> |
---|
76 | </group> |
---|
77 | |
---|
78 | <complexType name="key"> |
---|
79 | <attribute name="key" type="string" use="required"/> |
---|
80 | <attribute name="value" type="string"/> |
---|
81 | </complexType> |
---|
82 | |
---|
83 | |
---|
84 | <complexType name="link"> |
---|
85 | <attribute name="href" type="string" use="required" /> |
---|
86 | <attribute name="text" type="string" /> |
---|
87 | <attribute name="text_context" type="string" /> |
---|
88 | |
---|
89 | <attribute name="name" use="prohibited"/> |
---|
90 | <anyAttribute processContents="skip"/> |
---|
91 | </complexType> |
---|
92 | |
---|
93 | <complexType name="label"> |
---|
94 | <attribute name="text" type="string" use="required" /> |
---|
95 | <attribute name="text_context" type="string" /> |
---|
96 | |
---|
97 | <attribute name="name" use="prohibited"/> |
---|
98 | <anyAttribute processContents="skip"/> |
---|
99 | </complexType> |
---|
100 | |
---|
101 | <complexType name="space" /> |
---|
102 | |
---|
103 | <complexType name="text"> |
---|
104 | <attribute name="key" type="string" use="required"/> |
---|
105 | <attribute name="text" type="string" /> |
---|
106 | <attribute name="text_context" type="string" /> |
---|
107 | <attribute name="default" type="string" /> |
---|
108 | <attribute name="delete_if_empty" type="boolean" /> |
---|
109 | <attribute name="use_last_as_default" type="boolean" /> |
---|
110 | <attribute name="required" type="boolean"/> |
---|
111 | |
---|
112 | <attribute name="type" use="prohibited"/> |
---|
113 | <attribute name="name" use="prohibited"/> |
---|
114 | <attribute name="value" use="prohibited"/> |
---|
115 | <attribute name="values" use="prohibited"/> |
---|
116 | <anyAttribute processContents="skip"/> |
---|
117 | </complexType> |
---|
118 | |
---|
119 | <complexType name="combo"> |
---|
120 | <attribute name="key" type="string" use="required" /> |
---|
121 | <attribute name="text" type="string" /> |
---|
122 | <attribute name="text_context" type="string" /> |
---|
123 | <attribute name="values" type="string" use="required" /> |
---|
124 | <attribute name="values_context" type="string" /> |
---|
125 | <attribute name="display_values" type="string"/> |
---|
126 | <attribute name="default" type="string" /> |
---|
127 | <attribute name="editable" type="boolean" /> |
---|
128 | <attribute name="delete_if_empty" type="boolean" /> |
---|
129 | <attribute name="required" type="boolean"/> |
---|
130 | |
---|
131 | <attribute name="type" use="prohibited"/> |
---|
132 | <attribute name="value" use="prohibited"/> |
---|
133 | <attribute name="name" use="prohibited"/> |
---|
134 | <attribute name="delete-if-empty" use="prohibited"/> |
---|
135 | <attribute name="display-values" use="prohibited"/> |
---|
136 | <anyAttribute processContents="skip"/> |
---|
137 | </complexType> |
---|
138 | |
---|
139 | <complexType name="check"> |
---|
140 | <attribute name="key" type="string" use="required" /> |
---|
141 | <attribute name="text" type="string" /> |
---|
142 | <attribute name="text_context" type="string" /> |
---|
143 | <attribute name="default" type="tns:check_default" /> |
---|
144 | <attribute name="use_last_as_default" type="boolean" /> |
---|
145 | <attribute name="required" type="boolean"/> |
---|
146 | <attribute name="value_on" type="string"/> |
---|
147 | <attribute name="value_off" type="string"/> |
---|
148 | |
---|
149 | <attribute name="name" use="prohibited"/> |
---|
150 | <attribute name="type" use="prohibited"/> |
---|
151 | <attribute name="value" use="prohibited"/> |
---|
152 | <anyAttribute processContents="skip"/> |
---|
153 | </complexType> |
---|
154 | |
---|
155 | <simpleType name="check_default"> |
---|
156 | <restriction base="string"> |
---|
157 | <enumeration value="on" /> |
---|
158 | <enumeration value="off" /> |
---|
159 | </restriction> |
---|
160 | </simpleType> |
---|
161 | |
---|
162 | <complexType name="roles"> |
---|
163 | <sequence> |
---|
164 | <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded"/> |
---|
165 | </sequence> |
---|
166 | </complexType> |
---|
167 | |
---|
168 | <complexType name="role"> |
---|
169 | <attribute name="key" type="string"/> |
---|
170 | <attribute name="text" type="string"/> |
---|
171 | <attribute name="text_context" type="string"/> |
---|
172 | <attribute name="requisite" type="string"/> |
---|
173 | <attribute name="type" type="string"/> |
---|
174 | <attribute name="count" type="integer"/> |
---|
175 | <attribute name="required" type="boolean"/> |
---|
176 | </complexType> |
---|
177 | |
---|
178 | <simpleType name="role_requisite"> |
---|
179 | <restriction base="string"> |
---|
180 | <enumeration value="required"/> |
---|
181 | <enumeration value="optional"/> |
---|
182 | </restriction> |
---|
183 | </simpleType> |
---|
184 | |
---|
185 | </schema> |
---|