]> Wikimedia Canada | Git repositories - eccc_to_commons.git/blob - commons_rules.xsd
Fix indentation
[eccc_to_commons.git] / commons_rules.xsd
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- This schema is required to validate Environment and Climate Change Canada
3 historical data prior of its import into Wikidata.
4
5 All tests done in ECCC's bulkschema.xsd aren't replicated here as we're
6 focusing into pure Wikimedia Commons data quality -->
7 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 <!-- Define elements -->
9 <xsd:element name="climatedata">
10 <xsd:complexType>
11 <xsd:sequence>
12 <xsd:element ref="lang" minOccurs="1" maxOccurs="1" />
13 <xsd:element ref="stationinformation" minOccurs="1" maxOccurs="1" />
14 <xsd:element ref="legend" minOccurs="1" maxOccurs="1" />
15 <xsd:choice>
16 <xsd:element ref="stationdata" minOccurs="1" maxOccurs="unbounded" />
17 <xsd:element ref="month" minOccurs="1" maxOccurs="unbounded" />
18 </xsd:choice>
19 </xsd:sequence>
20 </xsd:complexType>
21 </xsd:element>
22
23 <xsd:element name="lang">
24 <xsd:simpleType>
25 <xsd:restriction base="xsd:string">
26 <xsd:annotation>
27 <xsd:documentation xml:lang="en">For consistency reasons in names and numeric formats, we enforce import of English files in Commons.
28 </xsd:documentation>
29 </xsd:annotation>
30 <xsd:enumeration value="ENG" />
31 </xsd:restriction>
32 </xsd:simpleType>
33 </xsd:element>
34
35 <xsd:element name="stationinformation">
36 <xsd:complexType>
37 <xsd:sequence>
38 <xsd:element ref="name" minOccurs="1" maxOccurs="1" />
39 <xsd:element ref="province" minOccurs="1" maxOccurs="1" />
40 <xsd:element ref="stationoperator" minOccurs="0" maxOccurs="1" />
41 <xsd:element ref="latitude" minOccurs="1" maxOccurs="1" />
42 <xsd:element ref="longitude" minOccurs="1" maxOccurs="1" />
43 <xsd:element ref="elevation" minOccurs="1" maxOccurs="1" />
44 <xsd:element ref="climate_identifier" minOccurs="1" maxOccurs="1" />
45 <xsd:element ref="wmo_identifier" minOccurs="1" maxOccurs="1" />
46 <xsd:element ref="tc_identifier" minOccurs="1" maxOccurs="1" />
47 </xsd:sequence>
48 </xsd:complexType>
49 </xsd:element>
50
51 <xsd:element name="name">
52 <xsd:simpleType>
53 <xsd:restriction base="xsd:string">
54 <xsd:pattern value="[0-9A-Z '().#,\-/&amp;]+" />
55 </xsd:restriction>
56 </xsd:simpleType>
57 </xsd:element>
58
59 <xsd:element name="province">
60 <xsd:simpleType>
61 <xsd:restriction base="xsd:string">
62 <xsd:enumeration value="ALBERTA" />
63 <xsd:enumeration value="BRITISH COLUMBIA" />
64 <xsd:enumeration value="QUEBEC" />
65 <xsd:enumeration value="MANITOBA" />
66 <xsd:enumeration value="NEW BRUNSWICK" />
67 <xsd:enumeration value="NEWFOUNDLAND" />
68 <xsd:enumeration value="NORTHWEST TERRITORIES" />
69 <xsd:enumeration value="NOVA SCOTIA" />
70 <xsd:enumeration value="NUNAVUT" />
71 <xsd:enumeration value="ONTARIO" />
72 <xsd:enumeration value="PRINCE EDWARD ISLAND" />
73 <xsd:enumeration value="SASKATCHEWAN" />
74 <xsd:enumeration value="YUKON TERRITORY" />
75 </xsd:restriction>
76 </xsd:simpleType>
77 </xsd:element>
78
79 <xsd:element name="stationoperator">
80 <xsd:simpleType>
81 <xsd:restriction base="xsd:string">
82 <xsd:pattern value="[A-Za-z -]+" />
83 </xsd:restriction>
84 </xsd:simpleType>
85 </xsd:element>
86
87 <xsd:element name="latitude">
88 <xsd:simpleType>
89 <xsd:union memberTypes="zero">
90 <xsd:annotation>
91 <xsd:documentation xml:lang="en">WARNING: latitude can be zero
92 </xsd:documentation>
93 </xsd:annotation>
94 <xsd:simpleType>
95 <xsd:restriction base="xsd:float">
96 <xsd:minInclusive value="41.6" />
97 <xsd:maxInclusive value="83.2" />
98 </xsd:restriction>
99 </xsd:simpleType>
100 <xsd:simpleType>
101 <xsd:annotation>
102 <xsd:documentation xml:lang="en">WARNING: en_climate_monthly_NB_8104200_1872-1952_P1M.xml is in Russia
103 </xsd:documentation>
104 </xsd:annotation>
105 <xsd:restriction base="xsd:float">
106 <xsd:enumeration value="45.07" />
107 </xsd:restriction>
108 </xsd:simpleType>
109 </xsd:union>
110 </xsd:simpleType>
111 </xsd:element>
112
113 <xsd:element name="longitude">
114 <xsd:simpleType>
115 <xsd:union memberTypes="zero">
116 <xsd:annotation>
117 <xsd:documentation xml:lang="en">WARNING: longitude can be zero
118 </xsd:documentation>
119 </xsd:annotation>
120 <xsd:simpleType>
121 <xsd:restriction base="xsd:float">
122 <xsd:minInclusive value="-141.0" />
123 <xsd:maxInclusive value="-52.0" />
124 </xsd:restriction>
125 </xsd:simpleType>
126 <xsd:simpleType>
127 <xsd:annotation>
128 <xsd:documentation xml:lang="en">WARNING: en_climate_monthly_NB_8104200_1872-1952_P1M.xml is in Russia
129 </xsd:documentation>
130 </xsd:annotation>
131 <xsd:restriction base="xsd:float">
132 <xsd:enumeration value="66.47" />
133 </xsd:restriction>
134 </xsd:simpleType>
135 </xsd:union>
136 </xsd:simpleType>
137 </xsd:element>
138
139 <xsd:element name="elevation">
140 <xsd:simpleType>
141 <xsd:union memberTypes="empty">
142 <xsd:simpleType>
143 <xsd:restriction base="xsd:float">
144 <xsd:minInclusive value="0.0" />
145 <xsd:maxInclusive value="2926.1" />
146 </xsd:restriction>
147 </xsd:simpleType>
148 </xsd:union>
149 </xsd:simpleType>
150 </xsd:element>
151
152 <xsd:element name="climate_identifier">
153 <xsd:simpleType>
154 <xsd:restriction base="xsd:string">
155 <xsd:pattern value="[0-9A-Z]+" />
156 </xsd:restriction>
157 </xsd:simpleType>
158 </xsd:element>
159
160 <xsd:element name="wmo_identifier">
161 <xsd:simpleType>
162 <xsd:union memberTypes="empty">
163 <xsd:simpleType>
164 <xsd:restriction base="xsd:nonNegativeInteger" />
165 </xsd:simpleType>
166 </xsd:union>
167 </xsd:simpleType>
168 </xsd:element>
169
170 <xsd:element name="tc_identifier">
171 <xsd:simpleType>
172 <xsd:union memberTypes="empty">
173 <xsd:simpleType>
174 <xsd:restriction base="xsd:string">
175 <xsd:pattern value="[A-Z0-9]{3}" />
176 </xsd:restriction>
177 </xsd:simpleType>
178 </xsd:union>
179 </xsd:simpleType>
180 </xsd:element>
181
182 <xsd:element name="legend">
183 <xsd:complexType>
184 <xsd:sequence>
185 <xsd:element ref="flag" minOccurs="1" maxOccurs="unbounded" />
186 </xsd:sequence>
187 </xsd:complexType>
188 </xsd:element>
189
190 <xsd:element name="flag">
191 <xsd:complexType>
192 <xsd:sequence>
193 <xsd:element ref="symbol" minOccurs="1" maxOccurs="1" />
194 <xsd:element ref="description" minOccurs="1" maxOccurs="1" />
195 </xsd:sequence>
196 </xsd:complexType>
197 </xsd:element>
198
199 <xsd:element name="symbol">
200 <xsd:simpleType>
201 <xsd:union>
202 <xsd:simpleType>
203 <xsd:restriction base="xsd:string">
204 <xsd:length value="1" />
205 </xsd:restriction>
206 </xsd:simpleType>
207 <xsd:simpleType>
208 <xsd:restriction base="xsd:string">
209 <xsd:enumeration value="[empty]">
210 <xsd:annotation>
211 <xsd:documentation xml:lang="en">[empty] is an allowed value
212 </xsd:documentation>
213 </xsd:annotation>
214 </xsd:enumeration>
215 </xsd:restriction>
216 </xsd:simpleType>
217 </xsd:union>
218 </xsd:simpleType>
219 </xsd:element>
220
221 <xsd:element name="description" type="xsd:anyType" />
222
223 <xsd:element name="stationdata">
224 <xsd:complexType>
225 <xsd:sequence>
226 <xsd:element ref="meanmaxtemp" minOccurs="1" maxOccurs="1" />
227 <xsd:element ref="meanmintemp" minOccurs="1" maxOccurs="1" />
228 <xsd:element ref="meanmonthtemp" minOccurs="1" maxOccurs="1" />
229 <xsd:element ref="extrmaxtemp" minOccurs="1" maxOccurs="1" />
230 <xsd:element ref="extrmintemp" minOccurs="1" maxOccurs="1" />
231 <xsd:element ref="totrain" minOccurs="1" maxOccurs="1" />
232 <xsd:element ref="totsnow" minOccurs="1" maxOccurs="1" />
233 <xsd:element ref="totprecip" minOccurs="1" maxOccurs="1" />
234 <xsd:element ref="grndsnowlastday" minOccurs="1" maxOccurs="1" />
235 <xsd:element ref="dirmaxgust" minOccurs="1" maxOccurs="1" />
236 <xsd:element ref="speedmaxgust" minOccurs="1" maxOccurs="1" />
237 </xsd:sequence>
238 <xsd:attributeGroup ref="attrgroup-stationdata" />
239 </xsd:complexType>
240 </xsd:element>
241
242 <xsd:element name="meanmaxtemp">
243 <xsd:complexType>
244 <xsd:simpleContent>
245 <xsd:extension base="meanmaxtemp-values">
246 <xsd:attributeGroup ref="attrgroup-meanmaxtemp" />
247 </xsd:extension>
248 </xsd:simpleContent>
249 </xsd:complexType>
250 </xsd:element>
251
252 <xsd:element name="meanmintemp">
253 <xsd:complexType>
254 <xsd:simpleContent>
255 <xsd:extension base="meanmintemp-values">
256 <xsd:attributeGroup ref="attrgroup-meanmintemp" />
257 </xsd:extension>
258 </xsd:simpleContent>
259 </xsd:complexType>
260 </xsd:element>
261
262 <xsd:element name="meanmonthtemp">
263 <xsd:complexType>
264 <xsd:simpleContent>
265 <xsd:extension base="meanmonthtemp-values">
266 <xsd:attributeGroup ref="attrgroup-meanmonthtemp" />
267 </xsd:extension>
268 </xsd:simpleContent>
269 </xsd:complexType>
270 </xsd:element>
271
272 <xsd:element name="extrmaxtemp">
273 <xsd:complexType>
274 <xsd:simpleContent>
275 <xsd:extension base="extrmaxtemp-values">
276 <xsd:attributeGroup ref="attrgroup-extrmaxtemp" />
277 </xsd:extension>
278 </xsd:simpleContent>
279 </xsd:complexType>
280 </xsd:element>
281
282 <xsd:element name="extrmintemp">
283 <xsd:complexType>
284 <xsd:simpleContent>
285 <xsd:extension base="extrmintemp-values">
286 <xsd:attributeGroup ref="attrgroup-extrmintemp" />
287 </xsd:extension>
288 </xsd:simpleContent>
289 </xsd:complexType>
290 </xsd:element>
291
292 <xsd:element name="totrain">
293 <xsd:complexType>
294 <xsd:simpleContent>
295 <xsd:extension base="total-rain-values">
296 <xsd:attributeGroup ref="attrgroup-totrain" />
297 </xsd:extension>
298 </xsd:simpleContent>
299 </xsd:complexType>
300 </xsd:element>
301
302 <xsd:element name="totsnow">
303 <xsd:complexType>
304 <xsd:simpleContent>
305 <xsd:extension base="total-snow-values">
306 <xsd:attributeGroup ref="attrgroup-totsnow" />
307 </xsd:extension>
308 </xsd:simpleContent>
309 </xsd:complexType>
310 </xsd:element>
311
312 <xsd:element name="totprecip">
313 <xsd:complexType>
314 <xsd:simpleContent>
315 <xsd:extension base="total-precipitation-values">
316 <xsd:attributeGroup ref="attrgroup-totprecipitation" />
317 </xsd:extension>
318 </xsd:simpleContent>
319 </xsd:complexType>
320 </xsd:element>
321
322 <xsd:element name="grndsnowlastday">
323 <xsd:complexType>
324 <xsd:simpleContent>
325 <xsd:extension base="total-grndsnowlastday">
326 <xsd:attributeGroup ref="attrgroup-grndsnowlastday" />
327 </xsd:extension>
328 </xsd:simpleContent>
329 </xsd:complexType>
330 </xsd:element>
331
332 <xsd:element name="dirmaxgust">
333 <xsd:complexType>
334 <xsd:simpleContent>
335 <xsd:extension base="total-dirmaxgust">
336 <xsd:attributeGroup ref="attrgroup-dirmaxgust" />
337 </xsd:extension>
338 </xsd:simpleContent>
339 </xsd:complexType>
340 </xsd:element>
341
342 <xsd:element name="speedmaxgust">
343 <xsd:complexType>
344 <xsd:simpleContent>
345 <xsd:extension base="total-speedmaxgust">
346 <xsd:attributeGroup ref="attrgroup-speedmaxgust" />
347 </xsd:extension>
348 </xsd:simpleContent>
349 </xsd:complexType>
350 </xsd:element>
351
352 <xsd:element name="month">
353 <xsd:complexType>
354 <xsd:sequence>
355 <xsd:element ref="day" minOccurs="0" maxOccurs="31" />
356 </xsd:sequence>
357 <xsd:attributeGroup ref="attrgroup-month" />
358 </xsd:complexType>
359 </xsd:element>
360
361 <xsd:element name="day">
362 <xsd:complexType>
363 <xsd:sequence>
364 <xsd:element ref="temperature" minOccurs="5" maxOccurs="5" />
365 <xsd:element ref="precipitation" minOccurs="4" maxOccurs="4" />
366 <xsd:element ref="pop" minOccurs="1" maxOccurs="1" />
367 </xsd:sequence>
368 <xsd:attributeGroup ref="attrgroup-day" />
369 </xsd:complexType>
370 </xsd:element>
371
372 <xsd:element name="temperature">
373 <xsd:complexType>
374 <xsd:simpleContent>
375 <xsd:extension base="temperature-values">
376 <xsd:attributeGroup ref="attrgroup-temperature" />
377 </xsd:extension>
378 </xsd:simpleContent>
379 </xsd:complexType>
380 </xsd:element>
381
382 <xsd:element name="precipitation">
383 <xsd:complexType>
384 <xsd:simpleContent>
385 <xsd:extension base="precipitation-values">
386 <xsd:attributeGroup ref="attrgroup-precipitation" />
387 </xsd:extension>
388 </xsd:simpleContent>
389 </xsd:complexType>
390 </xsd:element>
391
392 <xsd:element name="pop">
393 <xsd:complexType>
394 <xsd:simpleContent>
395 <xsd:extension base="pop-values">
396 <xsd:attributeGroup ref="attrgroup-pop" />
397 </xsd:extension>
398 </xsd:simpleContent>
399 </xsd:complexType>
400 </xsd:element>
401
402 <!-- Define attributes -->
403 <xsd:attribute name="flag">
404 <xsd:annotation>
405 <xsd:documentation xml:lang="en">flag attribute has only one value
406 </xsd:documentation>
407 </xsd:annotation>
408 <xsd:simpleType>
409 <xsd:restriction base="xsd:string">
410 <xsd:length value="1" />
411 </xsd:restriction>
412 </xsd:simpleType>
413 </xsd:attribute>
414
415 <!-- Define groups -->
416
417 <!-- Define attributes groups -->
418 <xsd:attributeGroup name="attrgroup-stationdata">
419 <xsd:attribute name="month" use="required">
420 <xsd:simpleType>
421 <xsd:restriction base="xsd:integer">
422 <xsd:minInclusive value="1" />
423 <xsd:maxInclusive value="12" />
424 </xsd:restriction>
425 </xsd:simpleType>
426 </xsd:attribute>
427 <xsd:attribute name="year" use="required">
428 <xsd:simpleType>
429 <xsd:restriction base="xsd:integer">
430 <xsd:minInclusive value="1840" />
431 <xsd:maxInclusive value="2020" />
432 </xsd:restriction>
433 </xsd:simpleType>
434 </xsd:attribute>
435 </xsd:attributeGroup>
436
437 <xsd:attributeGroup name="attrgroup-meanmaxtemp">
438 <xsd:attribute name="units" use="required">
439 <xsd:simpleType>
440 <xsd:restriction base="xsd:string">
441 <xsd:annotation>
442 <xsd:documentation xml:lang="en">meanmaxtemp must be provided in °C.
443 </xsd:documentation>
444 </xsd:annotation>
445 <xsd:enumeration value="°C" />
446 </xsd:restriction>
447 </xsd:simpleType>
448 </xsd:attribute>
449 <xsd:attribute name="description" use="optional" />
450 <xsd:attribute name="flag">
451 <xsd:simpleType>
452 <xsd:restriction base="xsd:string">
453 <xsd:annotation>
454 <xsd:documentation xml:lang="en">meanmaxtemp flag can be E I or M only.
455 </xsd:documentation>
456 </xsd:annotation>
457 <xsd:enumeration value="E" />
458 <xsd:enumeration value="I" />
459 <xsd:enumeration value="M" />
460 </xsd:restriction>
461 </xsd:simpleType>
462 </xsd:attribute>
463 </xsd:attributeGroup>
464
465 <xsd:attributeGroup name="attrgroup-meanmintemp">
466 <xsd:attribute name="units" use="required">
467 <xsd:simpleType>
468 <xsd:restriction base="xsd:string">
469 <xsd:annotation>
470 <xsd:documentation xml:lang="en">meanmintemp must be provided in °C.
471 </xsd:documentation>
472 </xsd:annotation>
473 <xsd:enumeration value="°C" />
474 </xsd:restriction>
475 </xsd:simpleType>
476 </xsd:attribute>
477 <xsd:attribute name="description" use="optional" />
478 <xsd:attribute name="flag">
479 <xsd:simpleType>
480 <xsd:restriction base="xsd:string">
481 <xsd:annotation>
482 <xsd:documentation xml:lang="en">meanmintemp flag can be E I or M only.
483 </xsd:documentation>
484 </xsd:annotation>
485 <xsd:enumeration value="E" />
486 <xsd:enumeration value="I" />
487 <xsd:enumeration value="M" />
488 </xsd:restriction>
489 </xsd:simpleType>
490 </xsd:attribute>
491 </xsd:attributeGroup>
492
493 <xsd:attributeGroup name="attrgroup-meanmonthtemp">
494 <xsd:attribute name="units" use="required">
495 <xsd:simpleType>
496 <xsd:restriction base="xsd:string">
497 <xsd:annotation>
498 <xsd:documentation xml:lang="en">meanmonthtemp must be provided in °C.
499 </xsd:documentation>
500 </xsd:annotation>
501 <xsd:enumeration value="°C" />
502 </xsd:restriction>
503 </xsd:simpleType>
504 </xsd:attribute>
505 <xsd:attribute name="description" use="optional" />
506 <xsd:attribute name="flag">
507 <xsd:simpleType>
508 <xsd:restriction base="xsd:string">
509 <xsd:annotation>
510 <xsd:documentation xml:lang="en">meanmonthtemp flag can be E I or M only.
511 </xsd:documentation>
512 </xsd:annotation>
513 <xsd:enumeration value="E" />
514 <xsd:enumeration value="I" />
515 <xsd:enumeration value="M" />
516 </xsd:restriction>
517 </xsd:simpleType>
518 </xsd:attribute>
519 </xsd:attributeGroup>
520
521 <xsd:attributeGroup name="attrgroup-extrmaxtemp">
522 <xsd:attribute name="units" use="required">
523 <xsd:simpleType>
524 <xsd:restriction base="xsd:string">
525 <xsd:annotation>
526 <xsd:documentation xml:lang="en">extrmaxtemp must be provided in °C.
527 </xsd:documentation>
528 </xsd:annotation>
529 <xsd:enumeration value="°C" />
530 </xsd:restriction>
531 </xsd:simpleType>
532 </xsd:attribute>
533 <xsd:attribute name="description" use="optional" />
534 <xsd:attribute name="flag">
535 <xsd:simpleType>
536 <xsd:restriction base="xsd:string">
537 <xsd:annotation>
538 <xsd:documentation xml:lang="en">extrmaxtemp flag can be B E I M or S only.
539 </xsd:documentation>
540 </xsd:annotation>
541 <xsd:enumeration value="B" />
542 <xsd:enumeration value="E" />
543 <xsd:enumeration value="I" />
544 <xsd:enumeration value="M" />
545 <xsd:enumeration value="S" />
546 </xsd:restriction>
547 </xsd:simpleType>
548 </xsd:attribute>
549 </xsd:attributeGroup>
550
551 <xsd:attributeGroup name="attrgroup-extrmintemp">
552 <xsd:attribute name="units" use="required">
553 <xsd:simpleType>
554 <xsd:restriction base="xsd:string">
555 <xsd:annotation>
556 <xsd:documentation xml:lang="en">extrmintemp must be provided in °C.
557 </xsd:documentation>
558 </xsd:annotation>
559 <xsd:enumeration value="°C" />
560 </xsd:restriction>
561 </xsd:simpleType>
562 </xsd:attribute>
563 <xsd:attribute name="description" use="optional" />
564 <xsd:attribute name="flag">
565 <xsd:simpleType>
566 <xsd:restriction base="xsd:string">
567 <xsd:annotation>
568 <xsd:documentation xml:lang="en">extrmintemp flag can be B E I M or S only.
569 </xsd:documentation>
570 </xsd:annotation>
571 <xsd:enumeration value="B" />
572 <xsd:enumeration value="E" />
573 <xsd:enumeration value="I" />
574 <xsd:enumeration value="M" />
575 <xsd:enumeration value="S" />
576 </xsd:restriction>
577 </xsd:simpleType>
578 </xsd:attribute>
579 </xsd:attributeGroup>
580
581 <xsd:attributeGroup name="attrgroup-totrain">
582 <xsd:attribute name="units" use="required">
583 <xsd:simpleType>
584 <xsd:restriction base="xsd:string">
585 <xsd:annotation>
586 <xsd:documentation xml:lang="en">totrain unit must be provided in mm.
587 </xsd:documentation>
588 </xsd:annotation>
589 <xsd:enumeration value="mm" />
590 </xsd:restriction>
591 </xsd:simpleType>
592 </xsd:attribute>
593 <xsd:attribute name="description" use="optional" />
594 <xsd:attribute name="flag">
595 <xsd:simpleType>
596 <xsd:restriction base="xsd:string">
597 <xsd:annotation>
598 <xsd:documentation xml:lang="en">totrain flag can be E I M or T only.
599 </xsd:documentation>
600 </xsd:annotation>
601 <xsd:enumeration value="E" />
602 <xsd:enumeration value="I" />
603 <xsd:enumeration value="M" />
604 <xsd:enumeration value="T" />
605 </xsd:restriction>
606 </xsd:simpleType>
607 </xsd:attribute>
608 </xsd:attributeGroup>
609
610 <xsd:attributeGroup name="attrgroup-totsnow">
611 <xsd:attribute name="units" use="required">
612 <xsd:simpleType>
613 <xsd:restriction base="xsd:string">
614 <xsd:annotation>
615 <xsd:documentation xml:lang="en">totsnow unit must be provided in cm.
616 </xsd:documentation>
617 </xsd:annotation>
618 <xsd:enumeration value="cm" />
619 </xsd:restriction>
620 </xsd:simpleType>
621 </xsd:attribute>
622 <xsd:attribute name="description" use="optional" />
623 <xsd:attribute name="flag">
624 <xsd:simpleType>
625 <xsd:restriction base="xsd:string">
626 <xsd:annotation>
627 <xsd:documentation xml:lang="en">totrain flag can be E I M or T only.
628 </xsd:documentation>
629 </xsd:annotation>
630 <xsd:enumeration value="E" />
631 <xsd:enumeration value="I" />
632 <xsd:enumeration value="M" />
633 <xsd:enumeration value="T" />
634 </xsd:restriction>
635 </xsd:simpleType>
636 </xsd:attribute>
637 </xsd:attributeGroup>
638
639 <xsd:attributeGroup name="attrgroup-totprecipitation">
640 <xsd:attribute name="units" use="required">
641 <xsd:simpleType>
642 <xsd:restriction base="xsd:string">
643 <xsd:annotation>
644 <xsd:documentation xml:lang="en">totprecip unit must be provided in mm.
645 </xsd:documentation>
646 </xsd:annotation>
647 <xsd:enumeration value="mm" />
648 </xsd:restriction>
649 </xsd:simpleType>
650 </xsd:attribute>
651 <xsd:attribute name="description" use="optional" />
652 <xsd:attribute name="flag">
653 <xsd:simpleType>
654 <xsd:restriction base="xsd:string">
655 <xsd:annotation>
656 <xsd:documentation xml:lang="en">totprecip flag can be E I M or T only.
657 </xsd:documentation>
658 </xsd:annotation>
659 <xsd:enumeration value="E" />
660 <xsd:enumeration value="I" />
661 <xsd:enumeration value="M" />
662 <xsd:enumeration value="T" />
663 </xsd:restriction>
664 </xsd:simpleType>
665 </xsd:attribute>
666 </xsd:attributeGroup>
667
668 <xsd:attributeGroup name="attrgroup-grndsnowlastday">
669 <xsd:attribute name="units" use="required">
670 <xsd:simpleType>
671 <xsd:restriction base="xsd:string">
672 <xsd:annotation>
673 <xsd:documentation xml:lang="en">grndsnowlastday unit must be provided in cm.
674 </xsd:documentation>
675 </xsd:annotation>
676 <xsd:enumeration value="cm" />
677 </xsd:restriction>
678 </xsd:simpleType>
679 </xsd:attribute>
680 <xsd:attribute name="description" use="optional" />
681 <xsd:attribute name="flag">
682 <xsd:simpleType>
683 <xsd:restriction base="xsd:string">
684 <xsd:annotation>
685 <xsd:documentation xml:lang="en">grndsnowlastday flag can be E M or T only.
686 </xsd:documentation>
687 </xsd:annotation>
688 <xsd:enumeration value="E" />
689 <xsd:enumeration value="M" />
690 <xsd:enumeration value="T" />
691 </xsd:restriction>
692 </xsd:simpleType>
693 </xsd:attribute>
694 </xsd:attributeGroup>
695
696 <xsd:attributeGroup name="attrgroup-dirmaxgust">
697 <xsd:attribute name="units" use="required">
698 <xsd:simpleType>
699 <xsd:restriction base="xsd:string">
700 <xsd:annotation>
701 <xsd:documentation xml:lang="en">dirmaxgust unit must be provided in 10's Deg.
702 </xsd:documentation>
703 </xsd:annotation>
704 <xsd:enumeration value="10's Deg" />
705 </xsd:restriction>
706 </xsd:simpleType>
707 </xsd:attribute>
708 <xsd:attribute name="description" use="optional" />
709 <xsd:attribute name="flag">
710 <xsd:simpleType>
711 <xsd:restriction base="xsd:string">
712 <xsd:annotation>
713 <xsd:documentation xml:lang="en">dirmaxgust flag can be B E I M or S only.
714 </xsd:documentation>
715 </xsd:annotation>
716 <xsd:enumeration value="B" />
717 <xsd:enumeration value="E" />
718 <xsd:enumeration value="I" />
719 <xsd:enumeration value="M" />
720 <xsd:enumeration value="S" />
721 </xsd:restriction>
722 </xsd:simpleType>
723 </xsd:attribute>
724 </xsd:attributeGroup>
725
726 <xsd:attributeGroup name="attrgroup-speedmaxgust">
727 <xsd:attribute name="units" use="required">
728 <xsd:simpleType>
729 <xsd:restriction base="xsd:string">
730 <xsd:annotation>
731 <xsd:documentation xml:lang="en">speedmaxgust unit must be provided in km/h.
732 </xsd:documentation>
733 </xsd:annotation>
734 <xsd:enumeration value="km/h"/>
735 </xsd:restriction>
736 </xsd:simpleType>
737 </xsd:attribute>
738 <xsd:attribute name="description" use="optional" />
739 <xsd:attribute name="flag">
740 <xsd:simpleType>
741 <xsd:restriction base="xsd:string">
742 <xsd:annotation>
743 <xsd:documentation xml:lang="en">speedmaxgust flag can be B E I M or S only.
744 </xsd:documentation>
745 </xsd:annotation>
746 <xsd:enumeration value="B" />
747 <xsd:enumeration value="E" />
748 <xsd:enumeration value="I" />
749 <xsd:enumeration value="M" />
750 <xsd:enumeration value="S" />
751 </xsd:restriction>
752 </xsd:simpleType>
753 </xsd:attribute>
754 </xsd:attributeGroup>
755
756 <xsd:attributeGroup name="attrgroup-month">
757 <xsd:attribute name="index" use="required">
758 <xsd:simpleType>
759 <xsd:restriction base="xsd:integer">
760 <xsd:minInclusive value="1" />
761 <xsd:maxInclusive value="12" />
762 </xsd:restriction>
763 </xsd:simpleType>
764 </xsd:attribute>
765 </xsd:attributeGroup>
766
767 <xsd:attributeGroup name="attrgroup-day">
768 <xsd:attribute name="index" use="required">
769 <xsd:simpleType>
770 <xsd:restriction base="xsd:integer">
771 <xsd:minInclusive value="1" />
772 <xsd:maxInclusive value="31" />
773 </xsd:restriction>
774 </xsd:simpleType>
775 </xsd:attribute>
776 </xsd:attributeGroup>
777
778 <xsd:attributeGroup name="attrgroup-temperature">
779 <xsd:attribute name="class" use="required">
780 <xsd:simpleType>
781 <xsd:restriction base="xsd:string">
782 <xsd:enumeration value="extremeMax" />
783 <xsd:enumeration value="extremeMin" />
784 <xsd:enumeration value="normalMax" />
785 <xsd:enumeration value="normalMin" />
786 <xsd:enumeration value="normalMean" />
787 </xsd:restriction>
788 </xsd:simpleType>
789 </xsd:attribute>
790 <xsd:attribute name="units" use="required">
791 <xsd:simpleType>
792 <xsd:restriction base="xsd:string">
793 <xsd:annotation>
794 <xsd:documentation xml:lang="en">temperature must be provided in °C.
795 </xsd:documentation>
796 </xsd:annotation>
797 <xsd:enumeration value="°C" />
798 </xsd:restriction>
799 </xsd:simpleType>
800 </xsd:attribute>
801 <xsd:attribute name="unitType" use="required">
802 <xsd:simpleType>
803 <xsd:restriction base="xsd:string">
804 <xsd:annotation>
805 <xsd:documentation xml:lang="en">unitType must be provided metric.
806 </xsd:documentation>
807 </xsd:annotation>
808 <xsd:enumeration value="metric" />
809 </xsd:restriction>
810 </xsd:simpleType>
811 </xsd:attribute>
812 <xsd:attribute name="period" use="optional" />
813 <xsd:attribute name="year" use="optional">
814 <xsd:simpleType>
815 <xsd:restriction base="xsd:integer">
816 <xsd:minInclusive value="1840" />
817 <xsd:maxInclusive value="2020" />
818 </xsd:restriction>
819 </xsd:simpleType>
820 </xsd:attribute>
821 <xsd:attribute name="quality" use="optional">
822 <xsd:simpleType>
823 <xsd:restriction base="xsd:string">
824 <xsd:enumeration value="†" />
825 </xsd:restriction>
826 </xsd:simpleType>
827 </xsd:attribute>
828 </xsd:attributeGroup>
829
830 <xsd:attributeGroup name="attrgroup-precipitation">
831 <xsd:attribute name="class" use="required">
832 <xsd:simpleType>
833 <xsd:restriction base="xsd:string">
834 <xsd:enumeration value="extremeRainfall" />
835 <xsd:enumeration value="extremeSnowfall" />
836 <xsd:enumeration value="extremePrecipitation" />
837 <xsd:enumeration value="extremeSnowOnGround" />
838 </xsd:restriction>
839 </xsd:simpleType>
840 </xsd:attribute>
841 <xsd:attribute name="units" use="required">
842 <xsd:simpleType>
843 <xsd:restriction base="xsd:string">
844 <xsd:annotation>
845 <xsd:documentation xml:lang="en">precipitation must be provided in mm or cm.
846 </xsd:documentation>
847 </xsd:annotation>
848 <xsd:enumeration value="mm" />
849 <xsd:enumeration value="cm" />
850 </xsd:restriction>
851 </xsd:simpleType>
852 </xsd:attribute>
853 <xsd:attribute name="unitType" use="required">
854 <xsd:simpleType>
855 <xsd:restriction base="xsd:string">
856 <xsd:annotation>
857 <xsd:documentation xml:lang="en">unitType must be provided metric.
858 </xsd:documentation>
859 </xsd:annotation>
860 <xsd:enumeration value="metric" />
861 </xsd:restriction>
862 </xsd:simpleType>
863 </xsd:attribute>
864 <xsd:attribute name="period" use="required" />
865 <xsd:attribute name="year" use="optional">
866 <xsd:simpleType>
867 <xsd:restriction base="xsd:integer">
868 <xsd:minInclusive value="1840" />
869 <xsd:maxInclusive value="2020" />
870 </xsd:restriction>
871 </xsd:simpleType>
872 </xsd:attribute>
873 <xsd:attribute name="quality" use="optional">
874 <xsd:simpleType>
875 <xsd:restriction base="xsd:string">
876 <xsd:enumeration value="†" />
877 </xsd:restriction>
878 </xsd:simpleType>
879 </xsd:attribute>
880 </xsd:attributeGroup>
881
882 <xsd:attributeGroup name="attrgroup-pop">
883 <xsd:attribute name="units" use="required">
884 <xsd:simpleType>
885 <xsd:restriction base="xsd:string">
886 <xsd:enumeration value="%" />
887 </xsd:restriction>
888 </xsd:simpleType>
889 </xsd:attribute>
890 </xsd:attributeGroup>
891
892 <!-- Define types -->
893 <xsd:simpleType name="meanmaxtemp-values">
894 <xsd:union memberTypes="empty">
895 <xsd:simpleType>
896 <xsd:restriction base="xsd:float">
897 <xsd:minInclusive value="-45.6" />
898 <xsd:maxInclusive value="35.8">
899 <xsd:annotation>
900 <xsd:documentation xml:lang="en">Max value is currently 19.3.
901 </xsd:documentation>
902 </xsd:annotation>
903 </xsd:maxInclusive>
904 </xsd:restriction>
905 </xsd:simpleType>
906 </xsd:union>
907 </xsd:simpleType>
908
909 <xsd:simpleType name="meanmintemp-values">
910 <xsd:union memberTypes="empty">
911 <xsd:simpleType>
912 <xsd:restriction base="xsd:float">
913 <xsd:minInclusive value="-50.1" />
914 <xsd:maxInclusive value="22.3">
915 <xsd:annotation>
916 <xsd:documentation xml:lang="en">Max value is currently 22.3.
917 </xsd:documentation>
918 </xsd:annotation>
919 </xsd:maxInclusive>
920 </xsd:restriction>
921 </xsd:simpleType>
922 </xsd:union>
923 </xsd:simpleType>
924
925 <xsd:simpleType name="meanmonthtemp-values">
926 <xsd:union memberTypes="empty">
927 <xsd:simpleType>
928 <xsd:restriction base="xsd:float">
929 <xsd:minInclusive value="-47.9" />
930 <xsd:maxInclusive value="27.2">
931 <xsd:annotation>
932 <xsd:documentation xml:lang="en">Max value is currently 27.2.
933 </xsd:documentation>
934 </xsd:annotation>
935 </xsd:maxInclusive>
936 </xsd:restriction>
937 </xsd:simpleType>
938 </xsd:union>
939 </xsd:simpleType>
940
941 <xsd:simpleType name="extrmaxtemp-values">
942 <xsd:union memberTypes="empty">
943 <xsd:simpleType>
944 <xsd:restriction base="xsd:float">
945 <xsd:minInclusive value="-40.0" />
946 <xsd:maxInclusive value="45.0">
947 <xsd:annotation>
948 <xsd:documentation xml:lang="en">Max value is currently 45.0.
949 </xsd:documentation>
950 </xsd:annotation>
951 </xsd:maxInclusive>
952 </xsd:restriction>
953 </xsd:simpleType>
954 </xsd:union>
955 </xsd:simpleType>
956
957 <xsd:simpleType name="extrmintemp-values">
958 <xsd:union memberTypes="empty">
959 <xsd:simpleType>
960 <xsd:restriction base="xsd:float">
961 <xsd:minInclusive value="-63" />
962 <xsd:maxInclusive value="37.3">
963 <xsd:annotation>
964 <xsd:documentation xml:lang="en">Max value is currently 37.3.
965 </xsd:documentation>
966 </xsd:annotation>
967 </xsd:maxInclusive>
968 </xsd:restriction>
969 </xsd:simpleType>
970 </xsd:union>
971 </xsd:simpleType>
972
973 <xsd:simpleType name="total-rain-values">
974 <xsd:union memberTypes="sharps empty">
975 <xsd:annotation>
976 <xsd:documentation xml:lang="en">WARNING:
977 17/monthly/en_climate_monthly_BC_1010720_1910-1971_P1M.xml:32:616122
978 Contains only sharps instead of a float or empty content
979 </xsd:documentation>
980 </xsd:annotation>
981 <xsd:simpleType>
982 <xsd:restriction base="xsd:float">
983 <xsd:minInclusive value="0" />
984 <xsd:maxInclusive value="999.5">
985 <xsd:annotation>
986 <xsd:documentation xml:lang="en">TBD: Max value is currently 999.2.
987 Is it expected? Looks high and arbitrary cut at 1000.
988 </xsd:documentation>
989 </xsd:annotation>
990 </xsd:maxInclusive>
991 </xsd:restriction>
992 </xsd:simpleType>
993 </xsd:union>
994 </xsd:simpleType>
995
996 <xsd:simpleType name="total-snow-values">
997 <xsd:union memberTypes="empty">
998 <xsd:annotation>
999 <xsd:documentation xml:lang="en">No value is allowed
1000 </xsd:documentation>
1001 </xsd:annotation>
1002 <xsd:simpleType>
1003 <xsd:restriction base="xsd:float">
1004 <xsd:minInclusive value="-15.1">
1005 <xsd:annotation>
1006 <xsd:documentation xml:lang="en">WARNING:
1007 monthly/3953/en_climate_monthly_ON_6032119_1970-2004_P1M.xml:32:261659
1008 Has negative totsnow value (-15.1)
1009 </xsd:documentation>
1010 </xsd:annotation>
1011 </xsd:minInclusive>
1012 <xsd:maxInclusive value="726">
1013 <xsd:annotation>
1014 <xsd:documentation xml:lang="en">Max value is currently 725.9.
1015 </xsd:documentation>
1016 </xsd:annotation>
1017 </xsd:maxInclusive>
1018 </xsd:restriction>
1019 </xsd:simpleType>
1020 </xsd:union>
1021 </xsd:simpleType>
1022
1023 <xsd:simpleType name="total-precipitation-values">
1024 <xsd:union memberTypes="sharps empty">
1025 <xsd:annotation>
1026 <xsd:documentation xml:lang="en">WARNING:
1027 17/monthly/en_climate_monthly_BC_1010720_1910-1971_P1M.xml:32:73731
1028 Contains only sharps instead of a float or empty content
1029 </xsd:documentation>
1030 </xsd:annotation>
1031 <xsd:simpleType>
1032 <xsd:restriction base="xsd:float">
1033 <xsd:minInclusive value="0">
1034 <xsd:annotation>
1035 <xsd:documentation xml:lang="en">No negative precipitation value allowed.
1036 </xsd:documentation>
1037 </xsd:annotation>
1038 </xsd:minInclusive>
1039 <xsd:maxInclusive value="999.5">
1040 <xsd:annotation>
1041 <xsd:documentation xml:lang="en">Max value is currently 999.2.
1042 Is it expected? Looks high and arbitrary cut at 1000.
1043 </xsd:documentation>
1044 </xsd:annotation>
1045 </xsd:maxInclusive>
1046 </xsd:restriction>
1047 </xsd:simpleType>
1048 </xsd:union>
1049 </xsd:simpleType>
1050
1051 <xsd:simpleType name="total-grndsnowlastday">
1052 <xsd:union memberTypes="empty">
1053 <xsd:annotation>
1054 <xsd:documentation xml:lang="en">No value is allowed
1055 </xsd:documentation>
1056 </xsd:annotation>
1057 <xsd:simpleType>
1058 <xsd:restriction base="xsd:integer">
1059 <xsd:minInclusive value="0">
1060 <xsd:annotation>
1061 <xsd:documentation xml:lang="en">No negative precipitation value allowed.
1062 </xsd:documentation>
1063 </xsd:annotation>
1064 </xsd:minInclusive>
1065 <xsd:maxInclusive value="955">
1066 <xsd:annotation>
1067 <xsd:documentation xml:lang="en">Max value is currently 955.
1068 Is it expected? Looks high and arbitrary cut at 1000.
1069 </xsd:documentation>
1070 </xsd:annotation>
1071 </xsd:maxInclusive>
1072 </xsd:restriction>
1073 </xsd:simpleType>
1074 </xsd:union>
1075 </xsd:simpleType>
1076
1077 <xsd:simpleType name="total-dirmaxgust">
1078 <xsd:union memberTypes="empty">
1079 <xsd:annotation>
1080 <xsd:documentation xml:lang="en">No value is allowed
1081 </xsd:documentation>
1082 </xsd:annotation>
1083 <xsd:simpleType>
1084 <xsd:restriction base="xsd:integer">
1085 <xsd:minInclusive value="0">
1086 <xsd:annotation>
1087 <xsd:documentation xml:lang="en">No negative orientation value allowed. Value of 0 is allowed
1088 </xsd:documentation>
1089 </xsd:annotation>
1090 </xsd:minInclusive>
1091 <xsd:maxInclusive value="36">
1092 <xsd:annotation>
1093 <xsd:documentation xml:lang="en">WARNING: Value of 36 is allowed.
1094 </xsd:documentation>
1095 </xsd:annotation>
1096 </xsd:maxInclusive>
1097 </xsd:restriction>
1098 </xsd:simpleType>
1099 </xsd:union>
1100 </xsd:simpleType>
1101
1102 <xsd:simpleType name="total-speedmaxgust">
1103 <xsd:union memberTypes="lt31 empty">
1104 <xsd:annotation>
1105 <xsd:documentation xml:lang="en">No value is allowed
1106 </xsd:documentation>
1107 </xsd:annotation>
1108 <xsd:simpleType>
1109 <xsd:restriction base="xsd:integer">
1110 <xsd:minInclusive value="0">
1111 <xsd:annotation>
1112 <xsd:documentation xml:lang="en">No negative speed allowed.
1113 </xsd:documentation>
1114 </xsd:annotation>
1115 </xsd:minInclusive>
1116 <xsd:maxInclusive value="467">
1117 <xsd:annotation>
1118 <xsd:documentation xml:lang="en">WARNING: Max value is currently 467.
1119 Probably an error
1120 </xsd:documentation>
1121 </xsd:annotation>
1122 </xsd:maxInclusive>
1123 </xsd:restriction>
1124 </xsd:simpleType>
1125 </xsd:union>
1126 </xsd:simpleType>
1127
1128 <xsd:simpleType name="temperature-values">
1129 <xsd:union memberTypes="empty">
1130 <xsd:simpleType>
1131 <xsd:restriction base="xsd:float">
1132 <xsd:minInclusive value="-63.0" />
1133 <xsd:maxInclusive value="50.0">
1134 <xsd:annotation>
1135 <xsd:documentation xml:lang="en">Value is currently between -63.0 and 50.0.
1136 </xsd:documentation>
1137 </xsd:annotation>
1138 </xsd:maxInclusive>
1139 </xsd:restriction>
1140 </xsd:simpleType>
1141 </xsd:union>
1142 </xsd:simpleType>
1143
1144 <xsd:simpleType name="precipitation-values">
1145 <xsd:union memberTypes="sharps empty">
1146 <xsd:simpleType>
1147 <xsd:restriction base="xsd:float">
1148 <xsd:minInclusive value="0.0" />
1149 <xsd:maxInclusive value="999">
1150 <xsd:annotation>
1151 <xsd:documentation xml:lang="en">Max value is currently 999.
1152 </xsd:documentation>
1153 </xsd:annotation>
1154 </xsd:maxInclusive>
1155 </xsd:restriction>
1156 </xsd:simpleType>
1157 </xsd:union>
1158 </xsd:simpleType>
1159
1160 <xsd:simpleType name="pop-values">
1161 <xsd:union memberTypes="empty">
1162 <xsd:simpleType>
1163 <xsd:restriction base="xsd:float">
1164 <xsd:minInclusive value="0.0" />
1165 <xsd:maxInclusive value="100.0">
1166 <xsd:annotation>
1167 <xsd:documentation xml:lang="en">Percentage.</xsd:documentation>
1168 </xsd:annotation>
1169 </xsd:maxInclusive>
1170 </xsd:restriction>
1171 </xsd:simpleType>
1172 </xsd:union>
1173 </xsd:simpleType>
1174
1175 <xsd:simpleType name="empty">
1176 <xsd:restriction base="xsd:string">
1177 <xsd:length value="0" />
1178 </xsd:restriction>
1179 </xsd:simpleType>
1180
1181 <xsd:simpleType name="zero">
1182 <xsd:restriction base="xsd:float">
1183 <xsd:enumeration value="0.0" />
1184 </xsd:restriction>
1185 </xsd:simpleType>
1186
1187 <xsd:simpleType name="sharps">
1188 <xsd:restriction base="xsd:string">
1189 <xsd:pattern value="#+" />
1190 </xsd:restriction>
1191 </xsd:simpleType>
1192
1193 <xsd:simpleType name="lt31">
1194 <xsd:restriction base="xsd:string">
1195 <xsd:pattern value="&lt;31" />
1196 </xsd:restriction>
1197 </xsd:simpleType>
1198 </xsd:schema>