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

Last change on this file since 6208 was 6198, checked in by Don-vip, 11 years ago

fix #9019, fix #9020 - add new item_separator element in presets + update doc (modified patch by skyper)

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