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

Last change on this file since 6504 was 6425, checked in by simon04, 10 years ago

see #9309 - presets: make selected combo/multiselect values searchable/findable via F3

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