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

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

see #7797 - extend presets by <preset_link preset_name="..." /> to add a link to another preset, exemplified in "Education" presets

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