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

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

fix tabs in tagging preset XSD

  • Property svn:mime-type set to text/plain
File size: 9.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
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="delimiter" type="string" />
159 <attribute name="editable" type="boolean" />
160 <attribute name="match" type="tns:match" />
161 <attribute name="length" type="positiveInteger" />
162
163 <attribute name="type" use="prohibited" />
164 <attribute name="value" use="prohibited" />
165 <attribute name="name" use="prohibited" />
166 <attribute name="delete-if-empty" use="prohibited" />
167 <attribute name="display-values" use="prohibited" />
168 <anyAttribute processContents="skip" />
169 </complexType>
170
171 <complexType name="multiselect">
172 <!-- use either list_entry's or a combination of values/display_values -->
173 <sequence>
174 <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
175 </sequence>
176 <attribute name="key" type="string" use="required" />
177 <attribute name="text" type="string" />
178 <attribute name="text_context" type="string" />
179 <attribute name="values" type="string" />
180 <attribute name="values_from" type="string" />
181 <attribute name="values_context" type="string" />
182 <attribute name="display_values" type="string" />
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="match" type="tns:match" />
187
188 <attribute name="type" use="prohibited" />
189 <attribute name="value" use="prohibited" />
190 <attribute name="name" use="prohibited" />
191 <attribute name="delete-if-empty" use="prohibited" />
192 <attribute name="display-values" use="prohibited" />
193 <anyAttribute processContents="skip" />
194 </complexType>
195
196 <complexType name="checkgroup">
197 <sequence>
198 <choice minOccurs="1" maxOccurs="unbounded">
199 <element name="check" type="tns:check" />
200 </choice>
201 </sequence>
202 <attribute name="columns" type="positiveInteger" />
203 <anyAttribute processContents="skip" />
204 </complexType>
205
206 <complexType name="check">
207 <attribute name="key" type="string" use="required" />
208 <attribute name="text" type="string" />
209 <attribute name="text_context" type="string" />
210 <attribute name="default" type="tns:check_default" />
211 <attribute name="value_on" type="string" />
212 <attribute name="value_off" type="string" />
213 <attribute name="match" type="tns:match" />
214
215 <attribute name="name" use="prohibited" />
216 <attribute name="type" use="prohibited" />
217 <attribute name="value" use="prohibited" />
218 <anyAttribute processContents="skip" />
219 </complexType>
220
221 <simpleType name="check_default">
222 <restriction base="string">
223 <enumeration value="on" />
224 <enumeration value="off" />
225 </restriction>
226 </simpleType>
227
228 <simpleType name="last_default">
229 <restriction base="string">
230 <enumeration value="true" />
231 <enumeration value="false" />
232 <enumeration value="force" />
233 </restriction>
234 </simpleType>
235
236 <simpleType name="match">
237 <restriction base="string">
238 <enumeration value="none" />
239 <enumeration value="key" />
240 <enumeration value="key!" />
241 <enumeration value="keyvalue" />
242 </restriction>
243 </simpleType>
244
245 <complexType name="roles">
246 <sequence>
247 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
248 </sequence>
249 </complexType>
250
251 <complexType name="role">
252 <attribute name="key" type="string" />
253 <attribute name="text" type="string" />
254 <attribute name="text_context" type="string" />
255 <attribute name="requisite" type="tns:role_requisite" />
256 <attribute name="type" type="string" />
257 <attribute name="count" type="integer" />
258 <attribute name="member_expression" type="string" />
259 <anyAttribute processContents="skip" />
260 </complexType>
261
262 <simpleType name="role_requisite">
263 <restriction base="string">
264 <enumeration value="required" />
265 <enumeration value="optional" />
266 </restriction>
267 </simpleType>
268
269</schema>
Note: See TracBrowser for help on using the repository browser.