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
RevLine 
[3321]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"
[3839]3 xmlns:tns="http://josm.openstreetmap.de/tagging-preset-1.0"
4 elementFormDefault="qualified">
[3321]5
[4431]6 <!-- Localized attributes (for example de.description are not supported
7 by xsd, so every element needs <anyAttribute/> To cover at least some common
[3839]8 errors, elements have specified prohibited attributes -->
[3321]9
[3839]10 <element name="annotations" type="tns:root" />
[6425]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>
[3321]21
22 <complexType name="root">
23 <complexContent>
[3839]24 <extension base="tns:group-parent">
[3321]25 <attribute name="author" type="string" />
26 <attribute name="version" type="string" />
27 <attribute name="shortdescription" type="string" />
28 <attribute name="description" type="string" />
[3839]29 <attribute name="link" type="string" />
[3321]30
[3839]31 <anyAttribute processContents="skip" />
[3321]32 </extension>
33 </complexContent>
34 </complexType>
35
[3839]36 <complexType name="group-parent">
[3321]37 <sequence>
38 <choice minOccurs="1" maxOccurs="unbounded">
[6425]39 <element name="chunk" type="tns:chunk"/>
[3321]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
[3839]47 <attribute name="type" use="prohibited" />
48 <attribute name="text" use="prohibited" />
49 <anyAttribute processContents="skip" />
[3321]50 </complexType>
51
[3839]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
[3321]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>
[5614]69 <element name="roles" type="tns:roles" minOccurs="0" maxOccurs="1" />
[3321]70 </sequence>
[3839]71 <attribute name="name" type="string" use="required" />
[3321]72 <attribute name="icon" type="string" />
73 <attribute name="type" type="string" />
[4431]74 <attribute name="name_template" type="string"/>
75 <attribute name="name_template_filter" type="string"/>
[3321]76
[3839]77 <attribute name="text" use="prohibited" />
78 <anyAttribute processContents="skip" />
[3321]79 </complexType>
80
81 <complexType name="optional">
82 <group ref="tns:optional_elements" maxOccurs="unbounded" />
[6308]83 <attribute name="text" type="string" />
84 <attribute name="text_context" type="string" />
[3321]85 </complexType>
86
[6425]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
[3321]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" />
[3793]109 <element name="multiselect" type="tns:multiselect" />
[6308]110 <element name="checkgroup" type="tns:checkgroup" />
[3321]111 <element name="check" type="tns:check" />
[6198]112 <element name="item_separator" type="tns:separator" />
[6425]113 <element name="reference" type="tns:reference" />
[3321]114 </choice>
115 </group>
116
117 <complexType name="key">
[3839]118 <attribute name="key" type="string" use="required" />
119 <attribute name="value" type="string" />
[5157]120 <attribute name="match" type="string" />
[3321]121 </complexType>
122
123
124 <complexType name="link">
125 <attribute name="href" type="string" use="required" />
126 <attribute name="text" type="string" />
[3582]127 <attribute name="text_context" type="string" />
[3321]128
[3839]129 <attribute name="name" use="prohibited" />
130 <anyAttribute processContents="skip" />
[3321]131 </complexType>
132
133 <complexType name="label">
134 <attribute name="text" type="string" use="required" />
[3582]135 <attribute name="text_context" type="string" />
[3321]136
[3839]137 <attribute name="name" use="prohibited" />
138 <anyAttribute processContents="skip" />
[3321]139 </complexType>
140
141 <complexType name="space" />
142
143 <complexType name="text">
[3839]144 <attribute name="key" type="string" use="required" />
[3321]145 <attribute name="text" type="string" />
[3582]146 <attribute name="text_context" type="string" />
[3321]147 <attribute name="default" type="string" />
[4218]148 <attribute name="use_last_as_default" type="tns:last_default" />
[5639]149 <attribute name="auto_increment" type="string" />
[5157]150 <attribute name="match" type="tns:match" />
[5997]151 <attribute name="length" type="positiveInteger" />
[3321]152
[3839]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" />
[3321]158 </complexType>
159
[5180]160 <complexType name="list_entry">
[5158]161 <attribute name="value" type="string" use="required" />
[5180]162 <attribute name="value_context" type="string" />
[5158]163 <attribute name="display_value" type="string" />
164 <attribute name="short_description" type="string" />
165 <attribute name="icon" type="string" />
[5585]166 <attribute name="icon_size" type="integer" />
[5722]167 <anyAttribute processContents="skip" />
[5158]168 </complexType>
169
[3321]170 <complexType name="combo">
[5158]171 <!-- use either list_entry's or a combination of values/display_values -->
[3741]172 <sequence>
[5158]173 <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
[3741]174 </sequence>
[3321]175 <attribute name="key" type="string" use="required" />
176 <attribute name="text" type="string" />
[3582]177 <attribute name="text_context" type="string" />
[5158]178 <attribute name="values" type="string" />
[6055]179 <attribute name="values_from" type="string" />
[3582]180 <attribute name="values_context" type="string" />
[3839]181 <attribute name="display_values" type="string" />
[6425]182 <attribute name="values_searchable" type="boolean" />
[3321]183 <attribute name="default" type="string" />
[4218]184 <attribute name="use_last_as_default" type="tns:last_default" />
[6308]185 <attribute name="delimiter" type="string" />
[3321]186 <attribute name="editable" type="boolean" />
[5157]187 <attribute name="match" type="tns:match" />
[5997]188 <attribute name="length" type="positiveInteger" />
[3321]189
[3839]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" />
[3321]196 </complexType>
197
[3793]198 <complexType name="multiselect">
[6308]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>
[3793]203 <attribute name="key" type="string" use="required" />
204 <attribute name="text" type="string" />
205 <attribute name="text_context" type="string" />
[6055]206 <attribute name="values" type="string" />
207 <attribute name="values_from" type="string" />
[3793]208 <attribute name="values_context" type="string" />
[3839]209 <attribute name="display_values" type="string" />
[6425]210 <attribute name="values_searchable" type="boolean" />
[3793]211 <attribute name="default" type="string" />
[4218]212 <attribute name="use_last_as_default" type="tns:last_default" />
[3793]213 <attribute name="delimiter" type="string" />
[5157]214 <attribute name="match" type="tns:match" />
[3793]215
[3839]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" />
[3793]222 </complexType>
223
[6308]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>
[6114]233
[3321]234 <complexType name="check">
235 <attribute name="key" type="string" use="required" />
236 <attribute name="text" type="string" />
[3582]237 <attribute name="text_context" type="string" />
[3321]238 <attribute name="default" type="tns:check_default" />
[3839]239 <attribute name="value_on" type="string" />
240 <attribute name="value_off" type="string" />
[5157]241 <attribute name="match" type="tns:match" />
[3321]242
[3839]243 <attribute name="name" use="prohibited" />
244 <attribute name="type" use="prohibited" />
245 <attribute name="value" use="prohibited" />
246 <anyAttribute processContents="skip" />
[3321]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
[4218]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
[5157]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
[3321]273 <complexType name="roles">
274 <sequence>
[3839]275 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
[3321]276 </sequence>
277 </complexType>
278
279 <complexType name="role">
[3839]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" />
[5614]286 <attribute name="member_expression" type="string" />
[5760]287 <anyAttribute processContents="skip" />
[3321]288 </complexType>
289
290 <simpleType name="role_requisite">
291 <restriction base="string">
[3839]292 <enumeration value="required" />
293 <enumeration value="optional" />
[3321]294 </restriction>
295 </simpleType>
296
[3533]297</schema>
Note: See TracBrowser for help on using the repository browser.