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

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

fix #8973 - presets: allow text attribute on optional item to set custom text + fix traffic_light/pedestrian corssing (modified patch by skyper)

  • 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 </choice>
88 </group>
89
90 <complexType name="key">
91 <attribute name="key" type="string" use="required" />
92 <attribute name="value" type="string" />
93 <attribute name="match" type="string" />
94 </complexType>
95
96
97 <complexType name="link">
98 <attribute name="href" type="string" use="required" />
99 <attribute name="text" type="string" />
100 <attribute name="text_context" type="string" />
101
102 <attribute name="name" use="prohibited" />
103 <anyAttribute processContents="skip" />
104 </complexType>
105
106 <complexType name="label">
107 <attribute name="text" type="string" use="required" />
108 <attribute name="text_context" type="string" />
109
110 <attribute name="name" use="prohibited" />
111 <anyAttribute processContents="skip" />
112 </complexType>
113
114 <complexType name="space" />
115
116 <complexType name="text">
117 <attribute name="key" type="string" use="required" />
118 <attribute name="text" type="string" />
119 <attribute name="text_context" type="string" />
120 <attribute name="default" type="string" />
121 <attribute name="use_last_as_default" type="tns:last_default" />
122 <attribute name="auto_increment" type="string" />
123 <attribute name="match" type="tns:match" />
124 <attribute name="length" type="positiveInteger" />
125
126 <attribute name="type" use="prohibited" />
127 <attribute name="name" use="prohibited" />
128 <attribute name="value" use="prohibited" />
129 <attribute name="values" use="prohibited" />
130 <anyAttribute processContents="skip" />
131 </complexType>
132
133 <complexType name="list_entry">
134 <attribute name="value" type="string" use="required" />
135 <attribute name="value_context" type="string" />
136 <attribute name="display_value" type="string" />
137 <attribute name="short_description" type="string" />
138 <attribute name="icon" type="string" />
139 <attribute name="icon_size" type="integer" />
140 <anyAttribute processContents="skip" />
141 </complexType>
142
143 <complexType name="combo">
144 <!-- use either list_entry's or a combination of values/display_values -->
145 <sequence>
146 <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
147 </sequence>
148 <attribute name="key" type="string" use="required" />
149 <attribute name="text" type="string" />
150 <attribute name="text_context" type="string" />
151 <attribute name="values" type="string" />
152 <attribute name="values_from" type="string" />
153 <attribute name="values_context" type="string" />
154 <attribute name="display_values" type="string" />
155 <attribute name="default" type="string" />
156 <attribute name="use_last_as_default" type="tns:last_default" />
157 <attribute name="editable" type="boolean" />
158 <attribute name="match" type="tns:match" />
159 <attribute name="length" type="positiveInteger" />
160
161 <attribute name="type" use="prohibited" />
162 <attribute name="value" use="prohibited" />
163 <attribute name="name" use="prohibited" />
164 <attribute name="delete-if-empty" use="prohibited" />
165 <attribute name="display-values" use="prohibited" />
166 <anyAttribute processContents="skip" />
167 </complexType>
168
169 <complexType name="multiselect">
170 <!-- use either list_entry's or a combination of values/display_values -->
171 <sequence>
172 <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
173 </sequence>
174 <attribute name="key" type="string" use="required" />
175 <attribute name="text" type="string" />
176 <attribute name="text_context" type="string" />
177 <attribute name="values" type="string" />
178 <attribute name="values_from" type="string" />
179 <attribute name="values_context" type="string" />
180 <attribute name="display_values" type="string" />
181 <attribute name="default" type="string" />
182 <attribute name="use_last_as_default" type="tns:last_default" />
183 <attribute name="delimiter" type="string" />
184 <attribute name="match" type="tns:match" />
185
186 <attribute name="type" use="prohibited" />
187 <attribute name="value" use="prohibited" />
188 <attribute name="name" use="prohibited" />
189 <attribute name="delete-if-empty" use="prohibited" />
190 <attribute name="display-values" use="prohibited" />
191 <anyAttribute processContents="skip" />
192 </complexType>
193
194 <complexType name="checkgroup">
195 <sequence>
196 <choice minOccurs="1" maxOccurs="unbounded">
197 <element name="check" type="tns:check" />
198 </choice>
199 </sequence>
200 <attribute name="columns" type="positiveInteger" />
201 <anyAttribute processContents="skip" />
202 </complexType>
203
204 <complexType name="check">
205 <attribute name="key" type="string" use="required" />
206 <attribute name="text" type="string" />
207 <attribute name="text_context" type="string" />
208 <attribute name="default" type="tns:check_default" />
209 <attribute name="value_on" type="string" />
210 <attribute name="value_off" type="string" />
211 <attribute name="match" type="tns:match" />
212
213 <attribute name="name" use="prohibited" />
214 <attribute name="type" use="prohibited" />
215 <attribute name="value" use="prohibited" />
216 <anyAttribute processContents="skip" />
217 </complexType>
218
219 <simpleType name="check_default">
220 <restriction base="string">
221 <enumeration value="on" />
222 <enumeration value="off" />
223 </restriction>
224 </simpleType>
225
226 <simpleType name="last_default">
227 <restriction base="string">
228 <enumeration value="true" />
229 <enumeration value="false" />
230 <enumeration value="force" />
231 </restriction>
232 </simpleType>
233
234 <simpleType name="match">
235 <restriction base="string">
236 <enumeration value="none" />
237 <enumeration value="key" />
238 <enumeration value="key!" />
239 <enumeration value="keyvalue" />
240 </restriction>
241 </simpleType>
242
243 <complexType name="roles">
244 <sequence>
245 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
246 </sequence>
247 </complexType>
248
249 <complexType name="role">
250 <attribute name="key" type="string" />
251 <attribute name="text" type="string" />
252 <attribute name="text_context" type="string" />
253 <attribute name="requisite" type="tns:role_requisite" />
254 <attribute name="type" type="string" />
255 <attribute name="count" type="integer" />
256 <attribute name="member_expression" type="string" />
257 <anyAttribute processContents="skip" />
258 </complexType>
259
260 <simpleType name="role_requisite">
261 <restriction base="string">
262 <enumeration value="required" />
263 <enumeration value="optional" />
264 </restriction>
265 </simpleType>
266
267</schema>
Note: See TracBrowser for help on using the repository browser.