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