]> Wikimedia Canada | Git repositories - eccc_schema.git/commitdiff
Schema can now validate almanac files
authorPierre Choffet <peuc@wanadoo.fr>
Tue, 21 Jan 2020 19:49:57 +0000 (14:49 -0500)
committerPierre Choffet <peuc@wanadoo.fr>
Tue, 21 Jan 2020 19:49:57 +0000 (14:49 -0500)
bulkschema.xsd

index ccc463335650e268b3eaac8b5197270153390298..d19e08cb5f369ff0722fba24225485bed1e78416 100644 (file)
                         </xsd:sequence>
                     </xsd:complexType>
                 </xsd:element>
                         </xsd:sequence>
                     </xsd:complexType>
                 </xsd:element>
-                <xsd:element name="stationdata" maxOccurs="unbounded">
+                <xsd:choice>
+                  <xsd:element name="stationdata" maxOccurs="unbounded">
+                      <xsd:complexType>
+                          <xsd:sequence>
+                            <xsd:element name="meanmaxtemp">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="meanmintemp">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="meanmonthtemp">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="extrmaxtemp">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="extrmintemp">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="totrain">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="totsnow">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="snowonground" minOccurs="0">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="totprecip">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="grndsnowlastday">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="dirmaxgust">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                            <xsd:element name="speedmaxgust">
+                              <xsd:complexType>
+                                <xsd:simpleContent>
+                                  <xsd:extension base="xsd:string">
+                                    <xsd:attribute name="description" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    <xsd:attribute name="flag" type="xsd:string" use="optional"/>
+                                  </xsd:extension>
+                                </xsd:simpleContent>
+                              </xsd:complexType>
+                            </xsd:element>
+                          </xsd:sequence>
+                          <xsd:attribute name="day" type="xsd:string" use="optional"/>
+                          <xsd:attribute name="month" type="xsd:string" use="required"/>
+                          <xsd:attribute name="year" type="xsd:string" use="required"/>
+                      </xsd:complexType>
+                  </xsd:element>
+                  <xsd:element name="month" maxOccurs="unbounded">
                     <xsd:complexType>
                     <xsd:complexType>
-                        <xsd:sequence>
-                          <xsd:element name="meanmaxtemp">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="meanmintemp">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="meanmonthtemp">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="extrmaxtemp">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="extrmintemp">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="totrain">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="totsnow">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="snowonground" minOccurs="0">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="totprecip">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="grndsnowlastday">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="dirmaxgust">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                          <xsd:element name="speedmaxgust">
-                            <xsd:complexType>
-                              <xsd:simpleContent>
-                                <xsd:extension base="xsd:string">
-                                  <xsd:attribute name="description" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="units" type="xsd:string" use="optional"/>
-                                  <xsd:attribute name="flag" type="xsd:string" use="optional"/>
-                                </xsd:extension>
-                              </xsd:simpleContent>
-                            </xsd:complexType>
-                          </xsd:element>
-                        </xsd:sequence>
-                        <xsd:attribute name="day" type="xsd:string" use="optional"/>
-                        <xsd:attribute name="month" type="xsd:string" use="required"/>
-                        <xsd:attribute name="year" type="xsd:string" use="required"/>
+                      <xsd:sequence>
+                        <xsd:element name="day" maxOccurs="unbounded">
+                          <xsd:complexType>
+                            <xsd:sequence>
+                              <xsd:element name="temperature" maxOccurs="unbounded">
+                                <xsd:complexType>
+                                  <xsd:simpleContent>
+                                    <xsd:extension base="xsd:string">
+                                      <xsd:attribute name="class" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="unitType" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="period" type="xsd:string" use="optional"/>
+                                    </xsd:extension>
+                                  </xsd:simpleContent>
+                                </xsd:complexType>
+                              </xsd:element>
+                              <xsd:element name="precipitation" maxOccurs="unbounded">
+                                <xsd:complexType>
+                                  <xsd:simpleContent>
+                                    <xsd:extension base="xsd:string">
+                                      <xsd:attribute name="class" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="unitType" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="year" type="xsd:string" use="optional"/>
+                                      <xsd:attribute name="period" type="xsd:string" use="optional"/>
+                                    </xsd:extension>
+                                  </xsd:simpleContent>
+                                </xsd:complexType>
+                              </xsd:element>
+                              <xsd:element name="pop">
+                                <xsd:complexType>
+                                  <xsd:simpleContent>
+                                    <xsd:extension base="xsd:string">
+                                      <xsd:attribute name="units" type="xsd:string" use="optional"/>
+                                    </xsd:extension>
+                                  </xsd:simpleContent>
+                                </xsd:complexType>
+                              </xsd:element>
+                            </xsd:sequence>
+                            <xsd:attribute name="index" type="xsd:integer" use="required"/>
+                          </xsd:complexType>
+                        </xsd:element>
+                      </xsd:sequence>
+                      <xsd:attribute name="index" type="xsd:integer" use="required"/>
                     </xsd:complexType>
                     </xsd:complexType>
-                </xsd:element>
+                  </xsd:element>
+                </xsd:choice>
             </xsd:sequence>
         </xsd:complexType>
     </xsd:element>
             </xsd:sequence>
         </xsd:complexType>
     </xsd:element>