]> Wikimedia Canada | Git repositories - eccc_to_commons.git/blob - commons_rules.xsd
1bfd00dbc0e07f457c9905ce6316975868d5cdd0
[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:element ref="stationdata" minOccurs="1" maxOccurs="unbounded" />
16 </xsd:sequence>
17 </xsd:complexType>
18 </xsd:element>
19
20 <xsd:element name="lang">
21 <xsd:simpleType>
22 <xsd:restriction base="xsd:string">
23 <xsd:annotation>
24 <xsd:documentation xml:lang="en">For consistency reasons in names and numeric formats, we enforce import of English files in Commons.
25 </xsd:documentation>
26 </xsd:annotation>
27 <xsd:enumeration value="ENG" />
28 </xsd:restriction>
29 </xsd:simpleType>
30 </xsd:element>
31
32 <xsd:element name="stationinformation">
33 <xsd:complexType>
34 <xsd:sequence>
35 <xsd:element ref="name" minOccurs="1" maxOccurs="1" />
36 <xsd:element ref="province" minOccurs="1" maxOccurs="1" />
37 <xsd:element ref="stationoperator" minOccurs="0" maxOccurs="1" />
38 <xsd:element ref="latitude" minOccurs="1" maxOccurs="1" />
39 <xsd:element ref="longitude" minOccurs="1" maxOccurs="1" />
40 <xsd:element ref="elevation" minOccurs="1" maxOccurs="1" />
41 <xsd:element ref="climate_identifier" minOccurs="1" maxOccurs="1" />
42 <xsd:element ref="wmo_identifier" minOccurs="1" maxOccurs="1" />
43 <xsd:element ref="tc_identifier" minOccurs="1" maxOccurs="1" />
44 </xsd:sequence>
45 </xsd:complexType>
46 </xsd:element>
47
48 <xsd:element name="name">
49 <xsd:simpleType>
50 <xsd:restriction base="xsd:string">
51 <xsd:pattern value="[0-9A-Z '().#,\-/&amp;]+" />
52 </xsd:restriction>
53 </xsd:simpleType>
54 </xsd:element>
55
56 <xsd:element name="province">
57 <xsd:simpleType>
58 <xsd:restriction base="xsd:string">
59 <xsd:enumeration value="ALBERTA" />
60 <xsd:enumeration value="BRITISH COLUMBIA" />
61 <xsd:enumeration value="QUEBEC" />
62 <xsd:enumeration value="MANITOBA" />
63 <xsd:enumeration value="NEW BRUNSWICK" />
64 <xsd:enumeration value="NEWFOUNDLAND" />
65 <xsd:enumeration value="NORTHWEST TERRITORIES" />
66 <xsd:enumeration value="NOVA SCOTIA" />
67 <xsd:enumeration value="NUNAVUT" />
68 <xsd:enumeration value="ONTARIO" />
69 <xsd:enumeration value="PRINCE EDWARD ISLAND" />
70 <xsd:enumeration value="SASKATCHEWAN" />
71 <xsd:enumeration value="YUKON TERRITORY" />
72 </xsd:restriction>
73 </xsd:simpleType>
74 </xsd:element>
75
76 <xsd:element name="stationoperator">
77 <xsd:simpleType>
78 <xsd:restriction base="xsd:string">
79 <xsd:pattern value="[A-Za-z -]+" />
80 </xsd:restriction>
81 </xsd:simpleType>
82 </xsd:element>
83
84 <xsd:element name="latitude">
85 <xsd:simpleType>
86 <xsd:union memberTypes="zero">
87 <xsd:annotation>
88 <xsd:documentation xml:lang="en">WARNING: latitude can be zero
89 </xsd:documentation>
90 </xsd:annotation>
91 <xsd:simpleType>
92 <xsd:restriction base="xsd:float">
93 <xsd:minInclusive value="41.6" />
94 <xsd:maxInclusive value="83.2" />
95 </xsd:restriction>
96 </xsd:simpleType>
97 <xsd:simpleType>
98 <xsd:annotation>
99 <xsd:documentation xml:lang="en">WARNING: en_climate_monthly_NB_8104200_1872-1952_P1M.xml is in Russia
100 </xsd:documentation>
101 </xsd:annotation>
102 <xsd:restriction base="xsd:float">
103 <xsd:enumeration value="45.07" />
104 </xsd:restriction>
105 </xsd:simpleType>
106 </xsd:union>
107 </xsd:simpleType>
108 </xsd:element>
109
110 <xsd:element name="longitude">
111 <xsd:simpleType>
112 <xsd:union memberTypes="zero">
113 <xsd:annotation>
114 <xsd:documentation xml:lang="en">WARNING: longitude can be zero
115 </xsd:documentation>
116 </xsd:annotation>
117 <xsd:simpleType>
118 <xsd:restriction base="xsd:float">
119 <xsd:minInclusive value="-141.0" />
120 <xsd:maxInclusive value="-52.0" />
121 </xsd:restriction>
122 </xsd:simpleType>
123 <xsd:simpleType>
124 <xsd:annotation>
125 <xsd:documentation xml:lang="en">WARNING: en_climate_monthly_NB_8104200_1872-1952_P1M.xml is in Russia
126 </xsd:documentation>
127 </xsd:annotation>
128 <xsd:restriction base="xsd:float">
129 <xsd:enumeration value="66.47" />
130 </xsd:restriction>
131 </xsd:simpleType>
132 </xsd:union>
133 </xsd:simpleType>
134 </xsd:element>
135
136 <xsd:element name="elevation">
137 <xsd:simpleType>
138 <xsd:union memberTypes="empty">
139 <xsd:simpleType>
140 <xsd:restriction base="xsd:float">
141 <xsd:minInclusive value="0.0" />
142 <xsd:maxInclusive value="2926.1" />
143 </xsd:restriction>
144 </xsd:simpleType>
145 </xsd:union>
146 </xsd:simpleType>
147 </xsd:element>
148
149 <xsd:element name="climate_identifier">
150 <xsd:simpleType>
151 <xsd:restriction base="xsd:string">
152 <xsd:pattern value="[0-9A-Z]+" />
153 </xsd:restriction>
154 </xsd:simpleType>
155 </xsd:element>
156
157 <xsd:element name="wmo_identifier">
158 <xsd:simpleType>
159 <xsd:union memberTypes="empty">
160 <xsd:simpleType>
161 <xsd:restriction base="xsd:nonNegativeInteger" />
162 </xsd:simpleType>
163 </xsd:union>
164 </xsd:simpleType>
165 </xsd:element>
166
167 <xsd:element name="tc_identifier">
168 <xsd:simpleType>
169 <xsd:union memberTypes="empty">
170 <xsd:simpleType>
171 <xsd:restriction base="xsd:string">
172 <xsd:pattern value="[A-Z0-9]{3}" />
173 </xsd:restriction>
174 </xsd:simpleType>
175 </xsd:union>
176 </xsd:simpleType>
177 </xsd:element>
178
179 <xsd:element name="legend">
180 <xsd:complexType>
181 <xsd:sequence>
182 <xsd:element ref="flag" minOccurs="1" maxOccurs="unbounded" />
183 </xsd:sequence>
184 </xsd:complexType>
185 </xsd:element>
186
187 <xsd:element name="flag">
188 <xsd:complexType>
189 <xsd:sequence>
190 <xsd:element ref="symbol" minOccurs="1" maxOccurs="1" />
191 <xsd:element ref="description" minOccurs="1" maxOccurs="1" />
192 </xsd:sequence>
193 </xsd:complexType>
194 </xsd:element>
195
196 <xsd:element name="symbol">
197 <xsd:simpleType>
198 <xsd:union>
199 <xsd:simpleType>
200 <xsd:restriction base="xsd:string">
201 <xsd:length value="1" />
202 </xsd:restriction>
203 </xsd:simpleType>
204 <xsd:simpleType>
205 <xsd:restriction base="xsd:string">
206 <xsd:enumeration value="[empty]">
207 <xsd:annotation>
208 <xsd:documentation xml:lang="en">[empty] is an allowed value
209 </xsd:documentation>
210 </xsd:annotation>
211 </xsd:enumeration>
212 </xsd:restriction>
213 </xsd:simpleType>
214 </xsd:union>
215 </xsd:simpleType>
216 </xsd:element>
217
218 <xsd:element name="description" type="xsd:anyType" />
219
220 <xsd:element name="stationdata">
221 <xsd:complexType>
222 <xsd:sequence>
223 <xsd:element ref="meanmaxtemp" minOccurs="1" maxOccurs="1" />
224 <xsd:element ref="meanmintemp" minOccurs="1" maxOccurs="1" />
225 <xsd:element ref="meanmonthtemp" minOccurs="1" maxOccurs="1" />
226 <xsd:element ref="extrmaxtemp" minOccurs="1" maxOccurs="1" />
227 <xsd:element ref="extrmintemp" minOccurs="1" maxOccurs="1" />
228 <xsd:element ref="totrain" minOccurs="1" maxOccurs="1" />
229 <xsd:element ref="totsnow" minOccurs="1" maxOccurs="1" />
230 <xsd:element ref="totprecip" minOccurs="1" maxOccurs="1" />
231 <xsd:element ref="grndsnowlastday" minOccurs="1" maxOccurs="1" />
232 <xsd:element ref="dirmaxgust" minOccurs="1" maxOccurs="1" />
233 <xsd:element ref="speedmaxgust" minOccurs="1" maxOccurs="1" />
234 </xsd:sequence>
235 <xsd:attributeGroup ref="attrgroup-stationdata" />
236 </xsd:complexType>
237 </xsd:element>
238
239 <xsd:element name="meanmaxtemp">
240 <xsd:complexType>
241 <xsd:simpleContent>
242 <xsd:extension base="meanmaxtemp-values">
243 <xsd:attributeGroup ref="attrgroup-meanmaxtemp" />
244 </xsd:extension>
245 </xsd:simpleContent>
246 </xsd:complexType>
247 </xsd:element>
248
249 <xsd:element name="meanmintemp">
250 <xsd:complexType>
251 <xsd:simpleContent>
252 <xsd:extension base="meanmintemp-values">
253 <xsd:attributeGroup ref="attrgroup-meanmintemp" />
254 </xsd:extension>
255 </xsd:simpleContent>
256 </xsd:complexType>
257 </xsd:element>
258
259 <xsd:element name="meanmonthtemp">
260 <xsd:complexType>
261 <xsd:simpleContent>
262 <xsd:extension base="meanmonthtemp-values">
263 <xsd:attributeGroup ref="attrgroup-meanmonthtemp" />
264 </xsd:extension>
265 </xsd:simpleContent>
266 </xsd:complexType>
267 </xsd:element>
268
269 <xsd:element name="extrmaxtemp">
270 <xsd:complexType>
271 <xsd:simpleContent>
272 <xsd:extension base="extrmaxtemp-values">
273 <xsd:attributeGroup ref="attrgroup-extrmaxtemp" />
274 </xsd:extension>
275 </xsd:simpleContent>
276 </xsd:complexType>
277 </xsd:element>
278
279 <xsd:element name="extrmintemp">
280 <xsd:complexType>
281 <xsd:simpleContent>
282 <xsd:extension base="extrmintemp-values">
283 <xsd:attributeGroup ref="attrgroup-extrmintemp" />
284 </xsd:extension>
285 </xsd:simpleContent>
286 </xsd:complexType>
287 </xsd:element>
288
289 <xsd:element name="totrain">
290 <xsd:complexType>
291 <xsd:simpleContent>
292 <xsd:extension base="total-rain-values">
293 <xsd:attributeGroup ref="attrgroup-totrain" />
294 </xsd:extension>
295 </xsd:simpleContent>
296 </xsd:complexType>
297 </xsd:element>
298
299 <xsd:element name="totsnow">
300 <xsd:complexType>
301 <xsd:simpleContent>
302 <xsd:extension base="total-snow-values">
303 <xsd:attributeGroup ref="attrgroup-totsnow" />
304 </xsd:extension>
305 </xsd:simpleContent>
306 </xsd:complexType>
307 </xsd:element>
308
309 <xsd:element name="totprecip">
310 <xsd:complexType>
311 <xsd:simpleContent>
312 <xsd:extension base="total-precipitation-values">
313 <xsd:attributeGroup ref="attrgroup-totprecipitation" />
314 </xsd:extension>
315 </xsd:simpleContent>
316 </xsd:complexType>
317 </xsd:element>
318
319 <xsd:element name="grndsnowlastday">
320 <xsd:complexType>
321 <xsd:simpleContent>
322 <xsd:extension base="total-grndsnowlastday">
323 <xsd:attributeGroup ref="attrgroup-grndsnowlastday" />
324 </xsd:extension>
325 </xsd:simpleContent>
326 </xsd:complexType>
327 </xsd:element>
328
329 <xsd:element name="dirmaxgust">
330 <xsd:complexType>
331 <xsd:simpleContent>
332 <xsd:extension base="total-dirmaxgust">
333 <xsd:attributeGroup ref="attrgroup-dirmaxgust" />
334 </xsd:extension>
335 </xsd:simpleContent>
336 </xsd:complexType>
337 </xsd:element>
338
339 <xsd:element name="speedmaxgust">
340 <xsd:complexType>
341 <xsd:simpleContent>
342 <xsd:extension base="total-speedmaxgust">
343 <xsd:attributeGroup ref="attrgroup-speedmaxgust" />
344 </xsd:extension>
345 </xsd:simpleContent>
346 </xsd:complexType>
347 </xsd:element>
348
349 <!-- Define attributes -->
350 <xsd:attribute name="flag">
351 <xsd:annotation>
352 <xsd:documentation xml:lang="en">flag attribute has only one value
353 </xsd:documentation>
354 </xsd:annotation>
355 <xsd:simpleType>
356 <xsd:restriction base="xsd:string">
357 <xsd:length value="1" />
358 </xsd:restriction>
359 </xsd:simpleType>
360 </xsd:attribute>
361
362 <!-- Define groups -->
363
364 <!-- Define attributes groups -->
365 <xsd:attributeGroup name="attrgroup-stationdata">
366 <xsd:attribute name="month" use="required">
367 <xsd:simpleType>
368 <xsd:restriction base="xsd:integer">
369 <xsd:minInclusive value="1" />
370 <xsd:maxInclusive value="12" />
371 </xsd:restriction>
372 </xsd:simpleType>
373 </xsd:attribute>
374 <xsd:attribute name="year" use="required">
375 <xsd:simpleType>
376 <xsd:restriction base="xsd:integer">
377 <xsd:minInclusive value="1840" />
378 <xsd:maxInclusive value="2019" />
379 </xsd:restriction>
380 </xsd:simpleType>
381 </xsd:attribute>
382 </xsd:attributeGroup>
383
384 <xsd:attributeGroup name="attrgroup-meanmaxtemp">
385 <xsd:attribute name="units" use="required">
386 <xsd:simpleType>
387 <xsd:restriction base="xsd:string">
388 <xsd:annotation>
389 <xsd:documentation xml:lang="en">meanmaxtemp must be provided in °C.
390 </xsd:documentation>
391 </xsd:annotation>
392 <xsd:enumeration value="°C" />
393 </xsd:restriction>
394 </xsd:simpleType>
395 </xsd:attribute>
396 <xsd:attribute name="description" use="optional" />
397 <xsd:attribute name="flag">
398 <xsd:simpleType>
399 <xsd:restriction base="xsd:string">
400 <xsd:annotation>
401 <xsd:documentation xml:lang="en">meanmaxtemp flag can be E I or M only.
402 </xsd:documentation>
403 </xsd:annotation>
404 <xsd:enumeration value="E" />
405 <xsd:enumeration value="I" />
406 <xsd:enumeration value="M" />
407 </xsd:restriction>
408 </xsd:simpleType>
409 </xsd:attribute>
410 </xsd:attributeGroup>
411
412 <xsd:attributeGroup name="attrgroup-meanmintemp">
413 <xsd:attribute name="units" use="required">
414 <xsd:simpleType>
415 <xsd:restriction base="xsd:string">
416 <xsd:annotation>
417 <xsd:documentation xml:lang="en">meanmintemp must be provided in °C.
418 </xsd:documentation>
419 </xsd:annotation>
420 <xsd:enumeration value="°C" />
421 </xsd:restriction>
422 </xsd:simpleType>
423 </xsd:attribute>
424 <xsd:attribute name="description" use="optional" />
425 <xsd:attribute name="flag">
426 <xsd:simpleType>
427 <xsd:restriction base="xsd:string">
428 <xsd:annotation>
429 <xsd:documentation xml:lang="en">meanmintemp flag can be E I or M only.
430 </xsd:documentation>
431 </xsd:annotation>
432 <xsd:enumeration value="E" />
433 <xsd:enumeration value="I" />
434 <xsd:enumeration value="M" />
435 </xsd:restriction>
436 </xsd:simpleType>
437 </xsd:attribute>
438 </xsd:attributeGroup>
439
440 <xsd:attributeGroup name="attrgroup-meanmonthtemp">
441 <xsd:attribute name="units" use="required">
442 <xsd:simpleType>
443 <xsd:restriction base="xsd:string">
444 <xsd:annotation>
445 <xsd:documentation xml:lang="en">meanmonthtemp must be provided in °C.
446 </xsd:documentation>
447 </xsd:annotation>
448 <xsd:enumeration value="°C" />
449 </xsd:restriction>
450 </xsd:simpleType>
451 </xsd:attribute>
452 <xsd:attribute name="description" use="optional" />
453 <xsd:attribute name="flag">
454 <xsd:simpleType>
455 <xsd:restriction base="xsd:string">
456 <xsd:annotation>
457 <xsd:documentation xml:lang="en">meanmonthtemp flag can be E I or M only.
458 </xsd:documentation>
459 </xsd:annotation>
460 <xsd:enumeration value="E" />
461 <xsd:enumeration value="I" />
462 <xsd:enumeration value="M" />
463 </xsd:restriction>
464 </xsd:simpleType>
465 </xsd:attribute>
466 </xsd:attributeGroup>
467
468 <xsd:attributeGroup name="attrgroup-extrmaxtemp">
469 <xsd:attribute name="units" use="required">
470 <xsd:simpleType>
471 <xsd:restriction base="xsd:string">
472 <xsd:annotation>
473 <xsd:documentation xml:lang="en">extrmaxtemp must be provided in °C.
474 </xsd:documentation>
475 </xsd:annotation>
476 <xsd:enumeration value="°C" />
477 </xsd:restriction>
478 </xsd:simpleType>
479 </xsd:attribute>
480 <xsd:attribute name="description" use="optional" />
481 <xsd:attribute name="flag">
482 <xsd:simpleType>
483 <xsd:restriction base="xsd:string">
484 <xsd:annotation>
485 <xsd:documentation xml:lang="en">extrmaxtemp flag can be B E I M or S only.
486 </xsd:documentation>
487 </xsd:annotation>
488 <xsd:enumeration value="B" />
489 <xsd:enumeration value="E" />
490 <xsd:enumeration value="I" />
491 <xsd:enumeration value="M" />
492 <xsd:enumeration value="S" />
493 </xsd:restriction>
494 </xsd:simpleType>
495 </xsd:attribute>
496 </xsd:attributeGroup>
497
498 <xsd:attributeGroup name="attrgroup-extrmintemp">
499 <xsd:attribute name="units" use="required">
500 <xsd:simpleType>
501 <xsd:restriction base="xsd:string">
502 <xsd:annotation>
503 <xsd:documentation xml:lang="en">extrmintemp must be provided in °C.
504 </xsd:documentation>
505 </xsd:annotation>
506 <xsd:enumeration value="°C" />
507 </xsd:restriction>
508 </xsd:simpleType>
509 </xsd:attribute>
510 <xsd:attribute name="description" use="optional" />
511 <xsd:attribute name="flag">
512 <xsd:simpleType>
513 <xsd:restriction base="xsd:string">
514 <xsd:annotation>
515 <xsd:documentation xml:lang="en">extrmintemp flag can be B E I M or S only.
516 </xsd:documentation>
517 </xsd:annotation>
518 <xsd:enumeration value="B" />
519 <xsd:enumeration value="E" />
520 <xsd:enumeration value="I" />
521 <xsd:enumeration value="M" />
522 <xsd:enumeration value="S" />
523 </xsd:restriction>
524 </xsd:simpleType>
525 </xsd:attribute>
526 </xsd:attributeGroup>
527
528 <xsd:attributeGroup name="attrgroup-totrain">
529 <xsd:attribute name="units" use="required">
530 <xsd:simpleType>
531 <xsd:restriction base="xsd:string">
532 <xsd:annotation>
533 <xsd:documentation xml:lang="en">totrain unit must be provided in mm.
534 </xsd:documentation>
535 </xsd:annotation>
536 <xsd:enumeration value="mm" />
537 </xsd:restriction>
538 </xsd:simpleType>
539 </xsd:attribute>
540 <xsd:attribute name="description" use="optional" />
541 <xsd:attribute name="flag">
542 <xsd:simpleType>
543 <xsd:restriction base="xsd:string">
544 <xsd:annotation>
545 <xsd:documentation xml:lang="en">totrain flag can be E I M or T only.
546 </xsd:documentation>
547 </xsd:annotation>
548 <xsd:enumeration value="E" />
549 <xsd:enumeration value="I" />
550 <xsd:enumeration value="M" />
551 <xsd:enumeration value="T" />
552 </xsd:restriction>
553 </xsd:simpleType>
554 </xsd:attribute>
555 </xsd:attributeGroup>
556
557 <xsd:attributeGroup name="attrgroup-totsnow">
558 <xsd:attribute name="units" use="required">
559 <xsd:simpleType>
560 <xsd:restriction base="xsd:string">
561 <xsd:annotation>
562 <xsd:documentation xml:lang="en">totsnow unit must be provided in cm.
563 </xsd:documentation>
564 </xsd:annotation>
565 <xsd:enumeration value="cm" />
566 </xsd:restriction>
567 </xsd:simpleType>
568 </xsd:attribute>
569 <xsd:attribute name="description" use="optional" />
570 <xsd:attribute name="flag">
571 <xsd:simpleType>
572 <xsd:restriction base="xsd:string">
573 <xsd:annotation>
574 <xsd:documentation xml:lang="en">totrain flag can be E I M or T only.
575 </xsd:documentation>
576 </xsd:annotation>
577 <xsd:enumeration value="E" />
578 <xsd:enumeration value="I" />
579 <xsd:enumeration value="M" />
580 <xsd:enumeration value="T" />
581 </xsd:restriction>
582 </xsd:simpleType>
583 </xsd:attribute>
584 </xsd:attributeGroup>
585
586 <xsd:attributeGroup name="attrgroup-totprecipitation">
587 <xsd:attribute name="units" use="required">
588 <xsd:simpleType>
589 <xsd:restriction base="xsd:string">
590 <xsd:annotation>
591 <xsd:documentation xml:lang="en">totprecip unit must be provided in mm.
592 </xsd:documentation>
593 </xsd:annotation>
594 <xsd:enumeration value="mm" />
595 </xsd:restriction>
596 </xsd:simpleType>
597 </xsd:attribute>
598 <xsd:attribute name="description" use="optional" />
599 <xsd:attribute name="flag">
600 <xsd:simpleType>
601 <xsd:restriction base="xsd:string">
602 <xsd:annotation>
603 <xsd:documentation xml:lang="en">totprecip flag can be E I M or T only.
604 </xsd:documentation>
605 </xsd:annotation>
606 <xsd:enumeration value="E" />
607 <xsd:enumeration value="I" />
608 <xsd:enumeration value="M" />
609 <xsd:enumeration value="T" />
610 </xsd:restriction>
611 </xsd:simpleType>
612 </xsd:attribute>
613 </xsd:attributeGroup>
614
615 <xsd:attributeGroup name="attrgroup-grndsnowlastday">
616 <xsd:attribute name="units" use="required">
617 <xsd:simpleType>
618 <xsd:restriction base="xsd:string">
619 <xsd:annotation>
620 <xsd:documentation xml:lang="en">grndsnowlastday unit must be provided in cm.
621 </xsd:documentation>
622 </xsd:annotation>
623 <xsd:enumeration value="cm" />
624 </xsd:restriction>
625 </xsd:simpleType>
626 </xsd:attribute>
627 <xsd:attribute name="description" use="optional" />
628 <xsd:attribute name="flag">
629 <xsd:simpleType>
630 <xsd:restriction base="xsd:string">
631 <xsd:annotation>
632 <xsd:documentation xml:lang="en">grndsnowlastday flag can be E M or T only.
633 </xsd:documentation>
634 </xsd:annotation>
635 <xsd:enumeration value="E" />
636 <xsd:enumeration value="M" />
637 <xsd:enumeration value="T" />
638 </xsd:restriction>
639 </xsd:simpleType>
640 </xsd:attribute>
641 </xsd:attributeGroup>
642
643 <xsd:attributeGroup name="attrgroup-dirmaxgust">
644 <xsd:attribute name="units" use="required">
645 <xsd:simpleType>
646 <xsd:restriction base="xsd:string">
647 <xsd:annotation>
648 <xsd:documentation xml:lang="en">dirmaxgust unit must be provided in 10's Deg.
649 </xsd:documentation>
650 </xsd:annotation>
651 <xsd:enumeration value="10's Deg" />
652 </xsd:restriction>
653 </xsd:simpleType>
654 </xsd:attribute>
655 <xsd:attribute name="description" use="optional" />
656 <xsd:attribute name="flag">
657 <xsd:simpleType>
658 <xsd:restriction base="xsd:string">
659 <xsd:annotation>
660 <xsd:documentation xml:lang="en">dirmaxgust flag can be B E I M or S only.
661 </xsd:documentation>
662 </xsd:annotation>
663 <xsd:enumeration value="B" />
664 <xsd:enumeration value="E" />
665 <xsd:enumeration value="I" />
666 <xsd:enumeration value="M" />
667 <xsd:enumeration value="S" />
668 </xsd:restriction>
669 </xsd:simpleType>
670 </xsd:attribute>
671 </xsd:attributeGroup>
672
673 <xsd:attributeGroup name="attrgroup-speedmaxgust">
674 <xsd:attribute name="units" use="required">
675 <xsd:simpleType>
676 <xsd:restriction base="xsd:string">
677 <xsd:annotation>
678 <xsd:documentation xml:lang="en">speedmaxgust unit must be provided in km/h.
679 </xsd:documentation>
680 </xsd:annotation>
681 <xsd:enumeration value="km/h"/>
682 </xsd:restriction>
683 </xsd:simpleType>
684 </xsd:attribute>
685 <xsd:attribute name="description" use="optional" />
686 <xsd:attribute name="flag">
687 <xsd:simpleType>
688 <xsd:restriction base="xsd:string">
689 <xsd:annotation>
690 <xsd:documentation xml:lang="en">speedmaxgust flag can be B E I M or S only.
691 </xsd:documentation>
692 </xsd:annotation>
693 <xsd:enumeration value="B" />
694 <xsd:enumeration value="E" />
695 <xsd:enumeration value="I" />
696 <xsd:enumeration value="M" />
697 <xsd:enumeration value="S" />
698 </xsd:restriction>
699 </xsd:simpleType>
700 </xsd:attribute>
701 </xsd:attributeGroup>
702
703 <!-- Define types -->
704 <xsd:simpleType name="meanmaxtemp-values">
705 <xsd:union memberTypes="empty">
706 <xsd:simpleType>
707 <xsd:restriction base="xsd:float">
708 <xsd:minInclusive value="-45.6" />
709 <xsd:maxInclusive value="35.8">
710 <xsd:annotation>
711 <xsd:documentation xml:lang="en">Max value is currently 19.3.
712 </xsd:documentation>
713 </xsd:annotation>
714 </xsd:maxInclusive>
715 </xsd:restriction>
716 </xsd:simpleType>
717 </xsd:union>
718 </xsd:simpleType>
719
720 <xsd:simpleType name="meanmintemp-values">
721 <xsd:union memberTypes="empty">
722 <xsd:simpleType>
723 <xsd:restriction base="xsd:float">
724 <xsd:minInclusive value="-50.1" />
725 <xsd:maxInclusive value="22.3">
726 <xsd:annotation>
727 <xsd:documentation xml:lang="en">Max value is currently 22.3.
728 </xsd:documentation>
729 </xsd:annotation>
730 </xsd:maxInclusive>
731 </xsd:restriction>
732 </xsd:simpleType>
733 </xsd:union>
734 </xsd:simpleType>
735
736 <xsd:simpleType name="meanmonthtemp-values">
737 <xsd:union memberTypes="empty">
738 <xsd:simpleType>
739 <xsd:restriction base="xsd:float">
740 <xsd:minInclusive value="-47.9" />
741 <xsd:maxInclusive value="27.2">
742 <xsd:annotation>
743 <xsd:documentation xml:lang="en">Max value is currently 27.2.
744 </xsd:documentation>
745 </xsd:annotation>
746 </xsd:maxInclusive>
747 </xsd:restriction>
748 </xsd:simpleType>
749 </xsd:union>
750 </xsd:simpleType>
751
752 <xsd:simpleType name="extrmaxtemp-values">
753 <xsd:union memberTypes="empty">
754 <xsd:simpleType>
755 <xsd:restriction base="xsd:float">
756 <xsd:minInclusive value="-40.0" />
757 <xsd:maxInclusive value="45.0">
758 <xsd:annotation>
759 <xsd:documentation xml:lang="en">Max value is currently 45.0.
760 </xsd:documentation>
761 </xsd:annotation>
762 </xsd:maxInclusive>
763 </xsd:restriction>
764 </xsd:simpleType>
765 </xsd:union>
766 </xsd:simpleType>
767
768 <xsd:simpleType name="extrmintemp-values">
769 <xsd:union memberTypes="empty">
770 <xsd:simpleType>
771 <xsd:restriction base="xsd:float">
772 <xsd:minInclusive value="-63" />
773 <xsd:maxInclusive value="37.3">
774 <xsd:annotation>
775 <xsd:documentation xml:lang="en">Max value is currently 37.3.
776 </xsd:documentation>
777 </xsd:annotation>
778 </xsd:maxInclusive>
779 </xsd:restriction>
780 </xsd:simpleType>
781 </xsd:union>
782 </xsd:simpleType>
783
784 <xsd:simpleType name="total-rain-values">
785 <xsd:union memberTypes="sharps empty">
786 <xsd:annotation>
787 <xsd:documentation xml:lang="en">WARNING:
788 17/monthly/en_climate_monthly_BC_1010720_1910-1971_P1M.xml:32:616122
789 Contains only sharps instead of a float or empty content
790 </xsd:documentation>
791 </xsd:annotation>
792 <xsd:simpleType>
793 <xsd:restriction base="xsd:float">
794 <xsd:minInclusive value="0" />
795 <xsd:maxInclusive value="999.5">
796 <xsd:annotation>
797 <xsd:documentation xml:lang="en">TBD: Max value is currently 999.2.
798 Is it expected? Looks high and arbitrary cut at 1000.
799 </xsd:documentation>
800 </xsd:annotation>
801 </xsd:maxInclusive>
802 </xsd:restriction>
803 </xsd:simpleType>
804 </xsd:union>
805 </xsd:simpleType>
806
807 <xsd:simpleType name="total-snow-values">
808 <xsd:union memberTypes="empty">
809 <xsd:annotation>
810 <xsd:documentation xml:lang="en">No value is allowed
811 </xsd:documentation>
812 </xsd:annotation>
813 <xsd:simpleType>
814 <xsd:restriction base="xsd:float">
815 <xsd:minInclusive value="-15.1">
816 <xsd:annotation>
817 <xsd:documentation xml:lang="en">WARNING:
818 monthly/3953/en_climate_monthly_ON_6032119_1970-2004_P1M.xml:32:261659
819 Has negative totsnow value (-15.1)
820 </xsd:documentation>
821 </xsd:annotation>
822 </xsd:minInclusive>
823 <xsd:maxInclusive value="726">
824 <xsd:annotation>
825 <xsd:documentation xml:lang="en">Max value is currently 725.9.
826 </xsd:documentation>
827 </xsd:annotation>
828 </xsd:maxInclusive>
829 </xsd:restriction>
830 </xsd:simpleType>
831 </xsd:union>
832 </xsd:simpleType>
833
834 <xsd:simpleType name="total-precipitation-values">
835 <xsd:union memberTypes="sharps empty">
836 <xsd:annotation>
837 <xsd:documentation xml:lang="en">WARNING:
838 17/monthly/en_climate_monthly_BC_1010720_1910-1971_P1M.xml:32:73731
839 Contains only sharps instead of a float or empty content
840 </xsd:documentation>
841 </xsd:annotation>
842 <xsd:simpleType>
843 <xsd:restriction base="xsd:float">
844 <xsd:minInclusive value="0">
845 <xsd:annotation>
846 <xsd:documentation xml:lang="en">No negative precipitation value allowed.
847 </xsd:documentation>
848 </xsd:annotation>
849 </xsd:minInclusive>
850 <xsd:maxInclusive value="999.5">
851 <xsd:annotation>
852 <xsd:documentation xml:lang="en">Max value is currently 999.2.
853 Is it expected? Looks high and arbitrary cut at 1000.
854 </xsd:documentation>
855 </xsd:annotation>
856 </xsd:maxInclusive>
857 </xsd:restriction>
858 </xsd:simpleType>
859 </xsd:union>
860 </xsd:simpleType>
861
862 <xsd:simpleType name="total-grndsnowlastday">
863 <xsd:union memberTypes="empty">
864 <xsd:annotation>
865 <xsd:documentation xml:lang="en">No value is allowed
866 </xsd:documentation>
867 </xsd:annotation>
868 <xsd:simpleType>
869 <xsd:restriction base="xsd:integer">
870 <xsd:minInclusive value="0">
871 <xsd:annotation>
872 <xsd:documentation xml:lang="en">No negative precipitation value allowed.
873 </xsd:documentation>
874 </xsd:annotation>
875 </xsd:minInclusive>
876 <xsd:maxInclusive value="955">
877 <xsd:annotation>
878 <xsd:documentation xml:lang="en">Max value is currently 955.
879 Is it expected? Looks high and arbitrary cut at 1000.
880 </xsd:documentation>
881 </xsd:annotation>
882 </xsd:maxInclusive>
883 </xsd:restriction>
884 </xsd:simpleType>
885 </xsd:union>
886 </xsd:simpleType>
887
888 <xsd:simpleType name="total-dirmaxgust">
889 <xsd:union memberTypes="empty">
890 <xsd:annotation>
891 <xsd:documentation xml:lang="en">No value is allowed
892 </xsd:documentation>
893 </xsd:annotation>
894 <xsd:simpleType>
895 <xsd:restriction base="xsd:integer">
896 <xsd:minInclusive value="0">
897 <xsd:annotation>
898 <xsd:documentation xml:lang="en">No negative orientation value allowed. Value of 0 is allowed
899 </xsd:documentation>
900 </xsd:annotation>
901 </xsd:minInclusive>
902 <xsd:maxInclusive value="36">
903 <xsd:annotation>
904 <xsd:documentation xml:lang="en">WARNING: Value of 36 is allowed.
905 </xsd:documentation>
906 </xsd:annotation>
907 </xsd:maxInclusive>
908 </xsd:restriction>
909 </xsd:simpleType>
910 </xsd:union>
911 </xsd:simpleType>
912
913 <xsd:simpleType name="total-speedmaxgust">
914 <xsd:union memberTypes="lt31 empty">
915 <xsd:annotation>
916 <xsd:documentation xml:lang="en">No value is allowed
917 </xsd:documentation>
918 </xsd:annotation>
919 <xsd:simpleType>
920 <xsd:restriction base="xsd:integer">
921 <xsd:minInclusive value="0">
922 <xsd:annotation>
923 <xsd:documentation xml:lang="en">No negative speed allowed.
924 </xsd:documentation>
925 </xsd:annotation>
926 </xsd:minInclusive>
927 <xsd:maxInclusive value="467">
928 <xsd:annotation>
929 <xsd:documentation xml:lang="en">WARNING: Max value is currently 467.
930 Probably an error
931 </xsd:documentation>
932 </xsd:annotation>
933 </xsd:maxInclusive>
934 </xsd:restriction>
935 </xsd:simpleType>
936 </xsd:union>
937 </xsd:simpleType>
938
939 <xsd:simpleType name="empty">
940 <xsd:restriction base="xsd:string">
941 <xsd:length value="0" />
942 </xsd:restriction>
943 </xsd:simpleType>
944
945 <xsd:simpleType name="zero">
946 <xsd:restriction base="xsd:float">
947 <xsd:enumeration value="0.0" />
948 </xsd:restriction>
949 </xsd:simpleType>
950
951 <xsd:simpleType name="sharps">
952 <xsd:restriction base="xsd:string">
953 <xsd:pattern value="#+" />
954 </xsd:restriction>
955 </xsd:simpleType>
956
957 <xsd:simpleType name="lt31">
958 <xsd:restriction base="xsd:string">
959 <xsd:pattern value="&lt;31" />
960 </xsd:restriction>
961 </xsd:simpleType>
962 </xsd:schema>