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"
|
---|
4 | elementFormDefault="qualified">
|
---|
5 |
|
---|
6 | <!-- Localized attributes (for example de.description are not supported
|
---|
7 | by xsd, so every element needs <anyAttribute/> To cover at least some common
|
---|
8 | errors, elements have specified prohibited attributes -->
|
---|
9 |
|
---|
10 | <element name="annotations" type="tns:root" />
|
---|
11 | <element name="presets" type="tns:root">
|
---|
12 | <unique name="chunk_id">
|
---|
13 | <selector xpath=".//tns:chunk"/>
|
---|
14 | <field xpath="@id"/>
|
---|
15 | </unique>
|
---|
16 | <keyref name="chunk_ref" refer="tns:chunk_id">
|
---|
17 | <selector xpath=".//tns:reference"/>
|
---|
18 | <field xpath="@ref"/>
|
---|
19 | </keyref>
|
---|
20 | </element>
|
---|
21 |
|
---|
22 | <complexType name="root">
|
---|
23 | <complexContent>
|
---|
24 | <extension base="tns:group-parent">
|
---|
25 | <attribute name="author" type="string" />
|
---|
26 | <attribute name="version" type="string" />
|
---|
27 | <attribute name="shortdescription" type="string" />
|
---|
28 | <attribute name="description" type="string" />
|
---|
29 | <attribute name="link" type="string" />
|
---|
30 | <attribute name="baselanguage" type="string" />
|
---|
31 |
|
---|
32 | <anyAttribute processContents="skip" />
|
---|
33 | </extension>
|
---|
34 | </complexContent>
|
---|
35 | </complexType>
|
---|
36 |
|
---|
37 | <complexType name="group-parent">
|
---|
38 | <sequence>
|
---|
39 | <choice minOccurs="1" maxOccurs="unbounded">
|
---|
40 | <element name="chunk" type="tns:chunk"/>
|
---|
41 | <element name="group" type="tns:group" />
|
---|
42 | <element name="item" type="tns:item" />
|
---|
43 | <element name="separator" type="tns:separator" />
|
---|
44 | </choice>
|
---|
45 | </sequence>
|
---|
46 | <attribute name="icon" type="string" />
|
---|
47 |
|
---|
48 | <attribute name="type" use="prohibited" />
|
---|
49 | <attribute name="text" use="prohibited" />
|
---|
50 | <anyAttribute processContents="skip" />
|
---|
51 | </complexType>
|
---|
52 |
|
---|
53 | <complexType name="group">
|
---|
54 | <complexContent>
|
---|
55 | <extension base="tns:group-parent">
|
---|
56 | <attribute name="name" type="string" use="required" />
|
---|
57 | </extension>
|
---|
58 | </complexContent>
|
---|
59 | </complexType>
|
---|
60 |
|
---|
61 | <complexType name="separator" />
|
---|
62 |
|
---|
63 | <complexType name="item">
|
---|
64 | <sequence>
|
---|
65 | <choice minOccurs="0" maxOccurs="unbounded">
|
---|
66 | <group ref="tns:optional_elements" />
|
---|
67 | <element name="key" type="tns:key" />
|
---|
68 | <element name="optional" type="tns:optional" minOccurs="0" />
|
---|
69 | </choice>
|
---|
70 | <element name="roles" type="tns:roles" minOccurs="0" maxOccurs="1" />
|
---|
71 | </sequence>
|
---|
72 | <attribute name="name" type="string" use="required" />
|
---|
73 | <attribute name="icon" type="string" />
|
---|
74 | <attribute name="type" type="string" />
|
---|
75 | <attribute name="name_template" type="string"/>
|
---|
76 | <attribute name="name_template_filter" type="string"/>
|
---|
77 | <attribute name="preset_name_label" type="boolean"/>
|
---|
78 |
|
---|
79 | <attribute name="text" use="prohibited" />
|
---|
80 | <anyAttribute processContents="skip" />
|
---|
81 | </complexType>
|
---|
82 |
|
---|
83 | <complexType name="optional">
|
---|
84 | <group ref="tns:optional_elements" maxOccurs="unbounded" />
|
---|
85 | <attribute name="text" type="string" />
|
---|
86 | <attribute name="text_context" type="string" />
|
---|
87 | </complexType>
|
---|
88 |
|
---|
89 | <complexType name="chunk">
|
---|
90 | <choice minOccurs="1" maxOccurs="1">
|
---|
91 | <sequence>
|
---|
92 | <choice minOccurs="1" maxOccurs="unbounded">
|
---|
93 | <group ref="tns:optional_elements" />
|
---|
94 | <element name="key" type="tns:key" />
|
---|
95 | <element name="optional" type="tns:optional" minOccurs="0" />
|
---|
96 | <element name="roles" type="tns:roles" minOccurs="0" />
|
---|
97 | </choice>
|
---|
98 | </sequence>
|
---|
99 | <sequence>
|
---|
100 | <!-- Cannot use tns:list_elements here because reference is present both in optional_elements and list_elements
|
---|
101 | so it violates cos-nonambig: Unique Particle Attribution :
|
---|
102 | <group ref="tns:list_elements" minOccurs="1" maxOccurs="unbounded" />-->
|
---|
103 | <element name="list_entry" type="tns:list_entry" minOccurs="1" maxOccurs="unbounded" />
|
---|
104 | </sequence>
|
---|
105 | </choice>
|
---|
106 | <attribute name="id" type="ID" use="required" />
|
---|
107 | </complexType>
|
---|
108 |
|
---|
109 | <complexType name="reference">
|
---|
110 | <attribute name="ref" type="IDREF" use="required" />
|
---|
111 | </complexType>
|
---|
112 |
|
---|
113 | <group name="optional_elements">
|
---|
114 | <choice>
|
---|
115 | <element name="label" type="tns:label" />
|
---|
116 | <element name="space" type="tns:space" />
|
---|
117 | <element name="link" type="tns:link" />
|
---|
118 | <element name="preset_link" type="tns:preset_link" />
|
---|
119 | <element name="text" type="tns:text" />
|
---|
120 | <element name="combo" type="tns:combo" />
|
---|
121 | <element name="multiselect" type="tns:multiselect" />
|
---|
122 | <element name="checkgroup" type="tns:checkgroup" />
|
---|
123 | <element name="check" type="tns:check" />
|
---|
124 | <element name="item_separator" type="tns:separator" />
|
---|
125 | <element name="reference" type="tns:reference" />
|
---|
126 | </choice>
|
---|
127 | </group>
|
---|
128 |
|
---|
129 | <group name="list_elements">
|
---|
130 | <choice>
|
---|
131 | <element name="list_entry" type="tns:list_entry" />
|
---|
132 | <element name="reference" type="tns:reference" />
|
---|
133 | </choice>
|
---|
134 | </group>
|
---|
135 |
|
---|
136 | <complexType name="key">
|
---|
137 | <attribute name="key" type="string" use="required" />
|
---|
138 | <attribute name="value" type="string" />
|
---|
139 | <attribute name="match" type="string" />
|
---|
140 | </complexType>
|
---|
141 |
|
---|
142 | <complexType name="link">
|
---|
143 | <attribute name="href" type="string" use="required" />
|
---|
144 | <attribute name="text" type="string" />
|
---|
145 | <attribute name="text_context" type="string" />
|
---|
146 |
|
---|
147 | <attribute name="name" use="prohibited" />
|
---|
148 | <anyAttribute processContents="skip" />
|
---|
149 | </complexType>
|
---|
150 |
|
---|
151 | <complexType name="preset_link">
|
---|
152 | <attribute name="preset_name" type="string" use="required" />
|
---|
153 | <attribute name="name" use="prohibited" />
|
---|
154 | </complexType>
|
---|
155 |
|
---|
156 | <complexType name="label">
|
---|
157 | <attribute name="text" type="string" use="required" />
|
---|
158 | <attribute name="text_context" type="string" />
|
---|
159 | <attribute name="icon" type="string" />
|
---|
160 | <attribute name="icon_size" type="integer" />
|
---|
161 |
|
---|
162 | <attribute name="name" use="prohibited" />
|
---|
163 | <anyAttribute processContents="skip" />
|
---|
164 | </complexType>
|
---|
165 |
|
---|
166 | <complexType name="space" />
|
---|
167 |
|
---|
168 | <complexType name="text">
|
---|
169 | <attribute name="key" type="string" use="required" />
|
---|
170 | <attribute name="text" type="string" />
|
---|
171 | <attribute name="text_context" type="string" />
|
---|
172 | <attribute name="default" type="string" />
|
---|
173 | <attribute name="use_last_as_default" type="tns:last_default" />
|
---|
174 | <attribute name="auto_increment" type="string" />
|
---|
175 | <attribute name="match" type="tns:match" />
|
---|
176 | <attribute name="length" type="positiveInteger" />
|
---|
177 | <attribute name="alternative_autocomplete_keys" type="string" />
|
---|
178 |
|
---|
179 | <attribute name="type" use="prohibited" />
|
---|
180 | <attribute name="name" use="prohibited" />
|
---|
181 | <attribute name="value" use="prohibited" />
|
---|
182 | <attribute name="values" use="prohibited" />
|
---|
183 | <anyAttribute processContents="skip" />
|
---|
184 | </complexType>
|
---|
185 |
|
---|
186 | <complexType name="list_entry">
|
---|
187 | <attribute name="value" type="string" use="required" />
|
---|
188 | <attribute name="value_context" type="string" />
|
---|
189 | <attribute name="display_value" type="string" />
|
---|
190 | <attribute name="short_description" type="string" />
|
---|
191 | <attribute name="icon" type="string" />
|
---|
192 | <attribute name="icon_size" type="integer" />
|
---|
193 | <anyAttribute processContents="skip" />
|
---|
194 | </complexType>
|
---|
195 |
|
---|
196 | <complexType name="combo">
|
---|
197 | <!-- use either list_entry's or a combination of values/display_values -->
|
---|
198 | <sequence>
|
---|
199 | <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
|
---|
200 | </sequence>
|
---|
201 | <attribute name="key" type="string" use="required" />
|
---|
202 | <attribute name="text" type="string" />
|
---|
203 | <attribute name="text_context" type="string" />
|
---|
204 | <attribute name="values" type="string" />
|
---|
205 | <attribute name="values_from" type="string" />
|
---|
206 | <attribute name="values_context" type="string" />
|
---|
207 | <attribute name="values_no_i18n" type="boolean" />
|
---|
208 | <attribute name="values_sort" type="boolean" />
|
---|
209 | <attribute name="display_values" type="string" />
|
---|
210 | <attribute name="values_searchable" type="boolean" />
|
---|
211 | <attribute name="default" type="string" />
|
---|
212 | <attribute name="use_last_as_default" type="tns:last_default" />
|
---|
213 | <attribute name="delimiter" type="string" />
|
---|
214 | <attribute name="editable" type="boolean" />
|
---|
215 | <attribute name="match" type="tns:match" />
|
---|
216 | <attribute name="length" type="positiveInteger" />
|
---|
217 |
|
---|
218 | <attribute name="type" use="prohibited" />
|
---|
219 | <attribute name="value" use="prohibited" />
|
---|
220 | <attribute name="name" use="prohibited" />
|
---|
221 | <attribute name="delete-if-empty" use="prohibited" />
|
---|
222 | <attribute name="display-values" use="prohibited" />
|
---|
223 | <anyAttribute processContents="skip" />
|
---|
224 | </complexType>
|
---|
225 |
|
---|
226 | <complexType name="multiselect">
|
---|
227 | <!-- use either list_entry's or a combination of values/display_values -->
|
---|
228 | <sequence>
|
---|
229 | <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
|
---|
230 | </sequence>
|
---|
231 | <attribute name="key" type="string" use="required" />
|
---|
232 | <attribute name="text" type="string" />
|
---|
233 | <attribute name="text_context" type="string" />
|
---|
234 | <attribute name="values" type="string" />
|
---|
235 | <attribute name="values_from" type="string" />
|
---|
236 | <attribute name="values_context" type="string" />
|
---|
237 | <attribute name="display_values" type="string" />
|
---|
238 | <attribute name="values_searchable" type="boolean" />
|
---|
239 | <attribute name="default" type="string" />
|
---|
240 | <attribute name="use_last_as_default" type="tns:last_default" />
|
---|
241 | <attribute name="delimiter" type="string" />
|
---|
242 | <attribute name="match" type="tns:match" />
|
---|
243 |
|
---|
244 | <attribute name="type" use="prohibited" />
|
---|
245 | <attribute name="value" use="prohibited" />
|
---|
246 | <attribute name="name" use="prohibited" />
|
---|
247 | <attribute name="delete-if-empty" use="prohibited" />
|
---|
248 | <attribute name="display-values" use="prohibited" />
|
---|
249 | <anyAttribute processContents="skip" />
|
---|
250 | </complexType>
|
---|
251 |
|
---|
252 | <complexType name="checkgroup">
|
---|
253 | <sequence>
|
---|
254 | <choice minOccurs="1" maxOccurs="unbounded">
|
---|
255 | <element name="check" type="tns:check" />
|
---|
256 | </choice>
|
---|
257 | </sequence>
|
---|
258 | <attribute name="columns" type="positiveInteger" />
|
---|
259 | <anyAttribute processContents="skip" />
|
---|
260 | </complexType>
|
---|
261 |
|
---|
262 | <complexType name="check">
|
---|
263 | <attribute name="key" type="string" use="required" />
|
---|
264 | <attribute name="text" type="string" />
|
---|
265 | <attribute name="text_context" type="string" />
|
---|
266 | <attribute name="default" type="tns:check_default" />
|
---|
267 | <attribute name="value_on" type="string" />
|
---|
268 | <attribute name="value_off" type="string" />
|
---|
269 | <attribute name="disable_off" type="boolean" />
|
---|
270 | <attribute name="match" type="tns:match" />
|
---|
271 |
|
---|
272 | <attribute name="name" use="prohibited" />
|
---|
273 | <attribute name="type" use="prohibited" />
|
---|
274 | <attribute name="value" use="prohibited" />
|
---|
275 | <anyAttribute processContents="skip" />
|
---|
276 | </complexType>
|
---|
277 |
|
---|
278 | <simpleType name="check_default">
|
---|
279 | <restriction base="string">
|
---|
280 | <enumeration value="on" />
|
---|
281 | <enumeration value="off" />
|
---|
282 | </restriction>
|
---|
283 | </simpleType>
|
---|
284 |
|
---|
285 | <simpleType name="last_default">
|
---|
286 | <restriction base="string">
|
---|
287 | <enumeration value="true" />
|
---|
288 | <enumeration value="false" />
|
---|
289 | <enumeration value="force" />
|
---|
290 | </restriction>
|
---|
291 | </simpleType>
|
---|
292 |
|
---|
293 | <simpleType name="match">
|
---|
294 | <restriction base="string">
|
---|
295 | <enumeration value="none" />
|
---|
296 | <enumeration value="key" />
|
---|
297 | <enumeration value="key!" />
|
---|
298 | <enumeration value="keyvalue" />
|
---|
299 | <enumeration value="keyvalue!" />
|
---|
300 | </restriction>
|
---|
301 | </simpleType>
|
---|
302 |
|
---|
303 | <complexType name="roles">
|
---|
304 | <sequence>
|
---|
305 | <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
|
---|
306 | </sequence>
|
---|
307 | </complexType>
|
---|
308 |
|
---|
309 | <complexType name="role">
|
---|
310 | <attribute name="key" type="string" />
|
---|
311 | <attribute name="text" type="string" />
|
---|
312 | <attribute name="text_context" type="string" />
|
---|
313 | <attribute name="requisite" type="tns:role_requisite" />
|
---|
314 | <attribute name="type" type="string" />
|
---|
315 | <attribute name="count" type="integer" />
|
---|
316 | <attribute name="member_expression" type="string" />
|
---|
317 | <attribute name="regexp" type="boolean" />
|
---|
318 | <anyAttribute processContents="skip" />
|
---|
319 | </complexType>
|
---|
320 |
|
---|
321 | <simpleType name="role_requisite">
|
---|
322 | <restriction base="string">
|
---|
323 | <enumeration value="required" />
|
---|
324 | <enumeration value="optional" />
|
---|
325 | </restriction>
|
---|
326 | </simpleType>
|
---|
327 |
|
---|
328 | </schema>
|
---|