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