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

Last change on this file since 8125 was 7937, checked in by bastiK, 9 years ago

add subversion property svn:eol=native

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