-
Notifications
You must be signed in to change notification settings - Fork 3
/
RenderTheme.xsd
365 lines (319 loc) · 18 KB
/
RenderTheme.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:tns="http://opensciencemap.org/rendertheme"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://opensciencemap.org/rendertheme" xml:lang="en">
<!-- attribute types -->
<xs:simpleType name="cap">
<xs:restriction base="xs:string">
<xs:enumeration value="butt" />
<xs:enumeration value="round" />
<xs:enumeration value="square" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="closed">
<xs:restriction base="xs:string">
<xs:enumeration value="yes" />
<xs:enumeration value="no" />
<xs:enumeration value="any" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="color">
<xs:restriction base="xs:string">
<xs:pattern value="#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="elementList">
<xs:restriction base="xs:string">
<xs:enumeration value="node" />
<xs:enumeration value="way" />
<xs:enumeration value="any" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="selectorList">
<xs:restriction base="xs:string">
<xs:enumeration value="first" />
<xs:enumeration value="any" />
<xs:enumeration value="when-matched" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fontFamily">
<xs:restriction base="xs:string">
<xs:enumeration value="default" />
<xs:enumeration value="default_bold" />
<xs:enumeration value="monospace" />
<xs:enumeration value="sans_serif" />
<xs:enumeration value="serif" />
<xs:enumeration value="thin" />
<xs:enumeration value="light" />
<xs:enumeration value="medium" />
<xs:enumeration value="black" />
<xs:enumeration value="condensed" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fontStyle">
<xs:restriction base="xs:string">
<xs:enumeration value="bold" />
<xs:enumeration value="bold_italic" />
<xs:enumeration value="italic" />
<xs:enumeration value="normal" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nonNegativeFloat">
<xs:restriction base="xs:float">
<xs:minInclusive value="0" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="src">
<xs:restriction base="xs:string">
<xs:pattern value="((file|assets):)?.+" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="strokeDasharray">
<xs:restriction base="xs:string">
<xs:pattern
value="([0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)? *, *)*[0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)?" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="textKey">
<xs:restriction base="xs:string">
<xs:enumeration value="ele" />
<xs:enumeration value="addr:housenumber" />
<xs:enumeration value="addr_housenumber" /> <!-- Mapzen -->
<xs:enumeration value="housenumber" /> <!-- OpenMapTiles -->
<xs:enumeration value="name" />
<xs:enumeration value="ref" />
</xs:restriction>
</xs:simpleType>
<!-- style menu cat element -->
<xs:complexType name="cat">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu name element -->
<xs:complexType name="name">
<xs:attribute name="lang" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu overlay element -->
<xs:complexType name="overlay">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu layer element -->
<xs:complexType name="layer">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="name" maxOccurs="unbounded" minOccurs="0" type="tns:name" />
<xs:element name="cat" maxOccurs="unbounded" minOccurs="0" type="tns:cat" />
<xs:element name="overlay" maxOccurs="unbounded" minOccurs="0" type="tns:overlay" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="parent" type="xs:string" use="optional" />
<xs:attribute name="visible" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="enabled" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<!-- rendering instructions -->
<xs:complexType name="area">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="fade" default="-1" type="xs:integer" use="optional" />
<xs:attribute name="blend" default="-1" type="xs:integer" use="optional" />
<xs:attribute name="blend-fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="mesh" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="caption">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="k" type="tns:textKey" use="required" />
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
<xs:attribute name="style" default="normal" type="tns:fontStyle" use="optional" />
<xs:attribute name="size" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="bg-fill" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
<!-- polygon area expressed as a ratio to tile area, e.g. 0.1 for 10% of tile area -->
<xs:attribute name="area-size" default="0" type="tns:nonNegativeFloat" use="optional" />
<!-- priority for label placement, 0 = highest priority -->
<xs:attribute name="priority" default="0" type="xs:integer" use="optional" />
<!-- symbol src name -->
<xs:attribute name="symbol" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
</xs:complexType>
<xs:complexType name="circle">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="radius" type="tns:nonNegativeFloat" use="required" />
<xs:attribute name="scale-radius" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="fill" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
</xs:complexType>
<xs:complexType name="line">
<xs:attribute name="cat" type="xs:string" use="optional" />
<!-- style: TODO only in style-line-->
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<!-- inherited style -->
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="width" default="0" type="xs:float" use="optional" />
<!-- minimum scaled width to draw outline -->
<xs:attribute name="min" default="0" type="xs:float" use="optional" />
<xs:attribute name="dasharray" type="tns:strokeDasharray" use="optional" />
<xs:attribute name="cap" default="round" type="tns:cap" use="optional" />
<xs:attribute name="outline" default="" type="xs:string" use="optional" />
<xs:attribute name="fade" default="-1" type="xs:integer" use="optional" />
<xs:attribute name="blur" default="-1" type="xs:float" use="optional" />
<xs:attribute name="fix" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="repeat-gap" default="200" type="xs:float" use="optional" />
<xs:attribute name="repeat-start" default="30" type="xs:float" use="optional" />
<!-- stipple repeat in 'pixel' -->
<xs:attribute name="stipple" default="0" type="xs:integer" use="optional" />
<!-- stipple color -->
<xs:attribute name="stipple-stroke" default="#000000" type="tns:color" use="optional" />
<!-- stipple width relative to line width, i.e 0.0-1.0 -->
<xs:attribute name="stipple-width" default="0" type="xs:float" use="optional" />
</xs:complexType>
<xs:complexType name="text">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="k" default="name" type="tns:textKey" use="optional" />
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
<xs:attribute name="style" default="normal" type="tns:fontStyle" use="optional" />
<xs:attribute name="size" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="bg-fill" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="caption" default="false" type="xs:boolean" use="optional" />
<!-- polygon area expressed as a ratio to tile area, e.g. 0.1 for 10% of tile area -->
<xs:attribute name="area-size" default="0" type="tns:nonNegativeFloat" use="optional" />
<!-- priority for label placement, 0 = highest priority -->
<xs:attribute name="priority" default="0" type="xs:integer" use="optional" />
</xs:complexType>
<xs:complexType name="symbol">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<!-- symbols on lines -->
<xs:attribute name="billboard" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="repeat" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="repeat-gap" default="200" type="xs:float" use="optional" />
<xs:attribute name="repeat-start" default="30" type="xs:float" use="optional" />
<xs:attribute name="rotate" default="true" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="extrusion">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="line-color" type="tns:color" use="optional" />
<xs:attribute name="side-color" type="tns:color" use="required" />
<xs:attribute name="top-color" type="tns:color" use="required" />
<xs:attribute name="hsv-h" default="0" type="xs:double" use="optional" />
<xs:attribute name="hsv-s" default="1" type="xs:double" use="optional" />
<xs:attribute name="hsv-v" default="1" type="xs:double" use="optional" />
<!-- 12m default -->
<xs:attribute name="default-height" default="12" type="xs:positiveInteger" use="optional" />
</xs:complexType>
<!-- match elements -->
<xs:complexType name="m">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<!-- recursion to allow for nested m -->
<xs:element name="m" type="tns:m" />
<xs:element name="area" type="tns:area" />
<xs:element name="caption" type="tns:caption" />
<xs:element name="circle" type="tns:circle" />
<xs:element name="line" type="tns:line" />
<xs:element name="outline" type="tns:line" />
<xs:element name="lineSymbol" type="tns:line" />
<xs:element name="text" type="tns:text" />
<xs:element name="extrusion" type="tns:extrusion" />
<xs:element name="symbol" type="tns:symbol" />
<!-- outline is defined within rules to match layering -->
<xs:element name="outline-layer" type="tns:line" />
</xs:choice>
<xs:attribute name="select" default="any" type="tns:selectorList" use="optional" />
<xs:attribute name="e" type="tns:elementList" use="optional" />
<xs:attribute name="k" type="xs:string" use="optional" />
<xs:attribute name="v" type="xs:string" use="optional" />
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="closed" default="any" type="tns:closed" use="optional" />
<xs:attribute name="zoom-min" default="0" type="xs:unsignedByte" use="optional" />
<xs:attribute name="zoom-max" default="127" type="xs:unsignedByte" use="optional" />
</xs:complexType>
<xs:complexType name="atlasRect">
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="pos" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="atlas">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="rect" type="tns:atlasRect" />
</xs:choice>
<xs:attribute name="img" type="xs:string" use="required" />
</xs:complexType>
<!-- stylemenu element -->
<xs:complexType name="stylemenu">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="layer" maxOccurs="unbounded" minOccurs="0" type="tns:layer" />
</xs:sequence>
<xs:attribute name="defaultvalue" type="xs:string" use="required" />
<xs:attribute name="defaultlang" type="xs:string" use="required" />
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- tag-transform element -->
<xs:complexType name="tag-transform">
<xs:attribute name="k" type="xs:string" use="required" />
<xs:attribute name="v" type="xs:string" use="optional" />
<xs:attribute name="k-lib" type="xs:string" use="required" />
<xs:attribute name="v-lib" type="xs:string" use="optional" />
</xs:complexType>
<!-- rendertheme element -->
<xs:complexType name="rendertheme">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="stylemenu" maxOccurs="1" minOccurs="0" type="tns:stylemenu" />
<!-- tag definitions -->
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="tag-transform" type="tns:tag-transform" />
</xs:choice>
<!-- style definitions -->
<xs:sequence maxOccurs="256" minOccurs="0">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="style-text" type="tns:text" />
<xs:element name="style-symbol" type="tns:symbol" />
<xs:element name="style-area" type="tns:area" />
<xs:element name="style-line" type="tns:line" />
<!-- <xs:element name="style-outline" type="tns:line" /> -->
</xs:choice>
</xs:sequence>
<xs:choice maxOccurs="1" minOccurs="0">
<xs:element name="atlas" type="tns:atlas" />
</xs:choice>
<!-- matching rules -->
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="m" type="tns:m" />
</xs:sequence>
</xs:sequence>
<xs:attribute name="version" type="xs:positiveInteger" use="required" />
<xs:attribute name="map-background" default="#ffffff" type="tns:color" use="optional" />
<xs:attribute name="base-stroke-width" default="1" type="tns:nonNegativeFloat"
use="optional" />
<xs:attribute name="base-text-scale" default="1" type="tns:nonNegativeFloat"
use="optional" />
</xs:complexType>
<!-- root element -->
<xs:element name="rendertheme" type="tns:rendertheme" />
</xs:schema>