source: josm/trunk/data/tagging-preset.xsd@ 7370

Last change on this file since 7370 was 7171, checked in by simon04, 11 years ago

fix #9682 #10048 - Presets: disable no value for some checkboxes in the preset dialog

This avoid that unneeded keys are created/suggested by JOSM, such as building=no

  • Property svn:mime-type set to text/plain
File size: 10.5 KB
Line 
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
31 <anyAttribute processContents="skip" />
32 </extension>
33 </complexContent>
34 </complexType>
35
36 <complexType name="group-parent">
37 <sequence>
38 <choice minOccurs="1" maxOccurs="unbounded">
39 <element name="chunk" type="tns:chunk"/>
40 <element name="group" type="tns:group" />
41 <element name="item" type="tns:item" />
42 <element name="separator" type="tns:separator" />
43 </choice>
44 </sequence>
45 <attribute name="icon" type="string" />
46
47 <attribute name="type" use="prohibited" />
48 <attribute name="text" use="prohibited" />
49 <anyAttribute processContents="skip" />
50 </complexType>
51
52 <complexType name="group">
53 <complexContent>
54 <extension base="tns:group-parent">
55 <attribute name="name" type="string" use="required" />
56 </extension>
57 </complexContent>
58 </complexType>
59
60 <complexType name="separator" />
61
62 <complexType name="item">
63 <sequence>
64 <choice minOccurs="0" maxOccurs="unbounded">
65 <group ref="tns:optional_elements" />
66 <element name="key" type="tns:key" />
67 <element name="optional" type="tns:optional" minOccurs="0" />
68 </choice>
69 <element name="roles" type="tns:roles" minOccurs="0" maxOccurs="1" />
70 </sequence>
71 <attribute name="name" type="string" use="required" />
72 <attribute name="icon" type="string" />
73 <attribute name="type" type="string" />
74 <attribute name="name_template" type="string"/>
75 <attribute name="name_template_filter" type="string"/>
76 <attribute name="preset_name_label" type="boolean"/>
77
78 <attribute name="text" use="prohibited" />
79 <anyAttribute processContents="skip" />
80 </complexType>
81
82 <complexType name="optional">
83 <group ref="tns:optional_elements" maxOccurs="unbounded" />
84 <attribute name="text" type="string" />
85 <attribute name="text_context" type="string" />
86 </complexType>
87
88 <complexType name="chunk">
89 <sequence>
90 <choice minOccurs="1" maxOccurs="unbounded">
91 <group ref="tns:optional_elements" />
92 <element name="key" type="tns:key" />
93 <element name="optional" type="tns:optional" minOccurs="0" />
94 </choice>
95 </sequence>
96 <attribute name="id" type="ID" use="required" />
97 </complexType>
98
99 <complexType name="reference">
100 <attribute name="ref" type="IDREF" use="required" />
101 </complexType>
102
103 <group name="optional_elements">
104 <choice>
105 <element name="label" type="tns:label" />
106 <element name="space" type="tns:space" />
107 <element name="link" type="tns:link" />
108 <element name="preset_link" type="tns:preset_link" />
109 <element name="text" type="tns:text" />
110 <element name="combo" type="tns:combo" />
111 <element name="multiselect" type="tns:multiselect" />
112 <element name="checkgroup" type="tns:checkgroup" />
113 <element name="check" type="tns:check" />
114 <element name="item_separator" type="tns:separator" />
115 <element name="reference" type="tns:reference" />
116 </choice>
117 </group>
118
119 <complexType name="key">
120 <attribute name="key" type="string" use="required" />
121 <attribute name="value" type="string" />
122 <attribute name="match" type="string" />
123 </complexType>
124
125
126 <complexType name="link">
127 <attribute name="href" type="string" use="required" />
128 <attribute name="text" type="string" />
129 <attribute name="text_context" type="string" />
130
131 <attribute name="name" use="prohibited" />
132 <anyAttribute processContents="skip" />
133 </complexType>
134
135 <complexType name="preset_link">
136 <attribute name="preset_name" type="string" use="required" />
137 <attribute name="name" use="prohibited" />
138 </complexType>
139
140 <complexType name="label">
141 <attribute name="text" type="string" use="required" />
142 <attribute name="text_context" type="string" />
143
144 <attribute name="name" use="prohibited" />
145 <anyAttribute processContents="skip" />
146 </complexType>
147
148 <complexType name="space" />
149
150 <complexType name="text">
151 <attribute name="key" type="string" use="required" />
152 <attribute name="text" type="string" />
153 <attribute name="text_context" type="string" />
154 <attribute name="default" type="string" />
155 <attribute name="use_last_as_default" type="tns:last_default" />
156 <attribute name="auto_increment" type="string" />
157 <attribute name="match" type="tns:match" />
158 <attribute name="length" type="positiveInteger" />
159 <attribute name="alternative_autocomplete_keys" type="string" />
160
161 <attribute name="type" use="prohibited" />
162 <attribute name="name" use="prohibited" />
163 <attribute name="value" use="prohibited" />
164 <attribute name="values" use="prohibited" />
165 <anyAttribute processContents="skip" />
166 </complexType>
167
168 <complexType name="list_entry">
169 <attribute name="value" type="string" use="required" />
170 <attribute name="value_context" type="string" />
171 <attribute name="display_value" type="string" />
172 <attribute name="short_description" type="string" />
173 <attribute name="icon" type="string" />
174 <attribute name="icon_size" type="integer" />
175 <anyAttribute processContents="skip" />
176 </complexType>
177
178 <complexType name="combo">
179 <!-- use either list_entry's or a combination of values/display_values -->
180 <sequence>
181 <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
182 </sequence>
183 <attribute name="key" type="string" use="required" />
184 <attribute name="text" type="string" />
185 <attribute name="text_context" type="string" />
186 <attribute name="values" type="string" />
187 <attribute name="values_from" type="string" />
188 <attribute name="values_context" type="string" />
189 <attribute name="display_values" type="string" />
190 <attribute name="values_searchable" type="boolean" />
191 <attribute name="default" type="string" />
192 <attribute name="use_last_as_default" type="tns:last_default" />
193 <attribute name="delimiter" type="string" />
194 <attribute name="editable" type="boolean" />
195 <attribute name="match" type="tns:match" />
196 <attribute name="length" type="positiveInteger" />
197
198 <attribute name="type" use="prohibited" />
199 <attribute name="value" use="prohibited" />
200 <attribute name="name" use="prohibited" />
201 <attribute name="delete-if-empty" use="prohibited" />
202 <attribute name="display-values" use="prohibited" />
203 <anyAttribute processContents="skip" />
204 </complexType>
205
206 <complexType name="multiselect">
207 <!-- use either list_entry's or a combination of values/display_values -->
208 <sequence>
209 <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
210 </sequence>
211 <attribute name="key" type="string" use="required" />
212 <attribute name="text" type="string" />
213 <attribute name="text_context" type="string" />
214 <attribute name="values" type="string" />
215 <attribute name="values_from" type="string" />
216 <attribute name="values_context" type="string" />
217 <attribute name="display_values" type="string" />
218 <attribute name="values_searchable" type="boolean" />
219 <attribute name="default" type="string" />
220 <attribute name="use_last_as_default" type="tns:last_default" />
221 <attribute name="delimiter" type="string" />
222 <attribute name="match" type="tns:match" />
223
224 <attribute name="type" use="prohibited" />
225 <attribute name="value" use="prohibited" />
226 <attribute name="name" use="prohibited" />
227 <attribute name="delete-if-empty" use="prohibited" />
228 <attribute name="display-values" use="prohibited" />
229 <anyAttribute processContents="skip" />
230 </complexType>
231
232 <complexType name="checkgroup">
233 <sequence>
234 <choice minOccurs="1" maxOccurs="unbounded">
235 <element name="check" type="tns:check" />
236 </choice>
237 </sequence>
238 <attribute name="columns" type="positiveInteger" />
239 <anyAttribute processContents="skip" />
240 </complexType>
241
242 <complexType name="check">
243 <attribute name="key" type="string" use="required" />
244 <attribute name="text" type="string" />
245 <attribute name="text_context" type="string" />
246 <attribute name="default" type="tns:check_default" />
247 <attribute name="value_on" type="string" />
248 <attribute name="value_off" type="string" />
249 <attribute name="disable_off" type="boolean" />
250 <attribute name="match" type="tns:match" />
251
252 <attribute name="name" use="prohibited" />
253 <attribute name="type" use="prohibited" />
254 <attribute name="value" use="prohibited" />
255 <anyAttribute processContents="skip" />
256 </complexType>
257
258 <simpleType name="check_default">
259 <restriction base="string">
260 <enumeration value="on" />
261 <enumeration value="off" />
262 </restriction>
263 </simpleType>
264
265 <simpleType name="last_default">
266 <restriction base="string">
267 <enumeration value="true" />
268 <enumeration value="false" />
269 <enumeration value="force" />
270 </restriction>
271 </simpleType>
272
273 <simpleType name="match">
274 <restriction base="string">
275 <enumeration value="none" />
276 <enumeration value="key" />
277 <enumeration value="key!" />
278 <enumeration value="keyvalue" />
279 </restriction>
280 </simpleType>
281
282 <complexType name="roles">
283 <sequence>
284 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
285 </sequence>
286 </complexType>
287
288 <complexType name="role">
289 <attribute name="key" type="string" />
290 <attribute name="text" type="string" />
291 <attribute name="text_context" type="string" />
292 <attribute name="requisite" type="tns:role_requisite" />
293 <attribute name="type" type="string" />
294 <attribute name="count" type="integer" />
295 <attribute name="member_expression" type="string" />
296 <anyAttribute processContents="skip" />
297 </complexType>
298
299 <simpleType name="role_requisite">
300 <restriction base="string">
301 <enumeration value="required" />
302 <enumeration value="optional" />
303 </restriction>
304 </simpleType>
305
306</schema>
Note: See TracBrowser for help on using the repository browser.