Ticket #153: CFStandardNameRules-1.1.xsd

File CFStandardNameRules-1.1.xsd, 4.8 KB (added by martin.juckes, 2 years ago)

CF Standard Name Rules Schema (based on CF Standard Name Schema)

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Bob Drach (UNIV OF CA LLNL) -->
3<!--W3C Schema generated by XMLSPY v5 rel. 2 U (http://www.xmlspy.com)-->
4<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified">
5        <xs:element name="contact" type="xs:string">
6                <xs:annotation>
7                        <xs:documentation>The person or institution that is responsible for maintaining the table.</xs:documentation>
8                </xs:annotation>
9        </xs:element>
10        <xs:element name="description" type="xs:string">
11                <xs:annotation>
12                        <xs:documentation>A textual description of the variable.</xs:documentation>
13                </xs:annotation>
14        </xs:element>
15        <xs:element name="target" type="xs:string">
16                <xs:annotation>
17                        <xs:documentation>The standard name which the rule applies to</xs:documentation>
18                </xs:annotation>
19        </xs:element>
20        <xs:element name="rule">
21                <xs:annotation>
22                        <xs:documentation>An rule element has an id the is a valid standard name and contains a rule</xs:documentation>
23                </xs:annotation>
24                <xs:complexType>
25                        <xs:sequence>
26                                <xs:element ref="description"/>
27                                <xs:element ref="target"/>
28                                <xs:choice>
29                                  <xs:element ref="requiredCoordinate"/>
30                                  <xs:element ref="requiredBoundAxis" />
31                                  <xs:element ref="charOrFlagIn" />
32                                  <xs:element ref="requiredAxis" />
33                                </xs:choice>
34                        </xs:sequence>
35                        <xs:attribute name="id" type="xs:ID" use="required"/>
36                </xs:complexType>
37        </xs:element>
38        <xs:element name="requiredCoordinate" type="xs:string">
39                <xs:annotation>
40                        <xs:documentation>Indicates a coordinate is required</xs:documentation>
41                </xs:annotation>
42        </xs:element>
43        <xs:element name="requiredBoundAxis" type="st__requiredAxis">
44                <xs:annotation>
45                        <xs:documentation>Indicates that a coordinate or dimension with the specified axis attribute is required, and that that variable should have a bounds attribute</xs:documentation>
46                </xs:annotation>
47        </xs:element>
48        <xs:element name="requiredAxis" type="st__requiredAxis">
49                <xs:annotation>
50                        <xs:documentation>Indicates that a coordinate or dimension with the specified axis attribute is required</xs:documentation>
51                </xs:annotation>
52        </xs:element>
53        <xs:element name="charOrFlagIn" type="st__inCFList">
54                <xs:annotation>
55                        <xs:documentation>The variable should have character values, or be associated with character values through flag_values and flag_meanings attributes. The character values must be in the CF table indicated by the element contents.</xs:documentation>
56                </xs:annotation>
57        </xs:element>
58        <xs:simpleType name="st__inCFList" final="restriction" >
59                <xs:restriction base="xs:string">
60                    <xs:enumeration value="CF Standard Region" />
61                    <xs:enumeration value="CF Area Type" />
62                </xs:restriction>
63        </xs:simpleType>
64        <xs:simpleType name="st__requiredAxis" final="restriction" >
65                <xs:restriction base="xs:string">
66                    <xs:enumeration value="X" />
67                    <xs:enumeration value="Y" />
68                    <xs:enumeration value="Z" />
69                    <xs:enumeration value="T" />
70                </xs:restriction>
71        </xs:simpleType>
72        <xs:element name="canonical_units" type="xs:string">
73                <xs:annotation>
74                        <xs:documentation>Standard SI units for this variable. In a netCDF file, the variable should have units that are translatable to the canonical units.</xs:documentation>
75                </xs:annotation>
76        </xs:element>
77        <xs:element name="institution" type="xs:string">
78                <xs:annotation>
79                        <xs:documentation>Institution that maintains the table.</xs:documentation>
80                </xs:annotation>
81        </xs:element>
82    <xs:element name="title" type="xs:string">
83        <xs:annotation>
84            <xs:documentation>Title of document</xs:documentation>
85        </xs:annotation>
86    </xs:element>
87    <xs:element name="version_number" type="xs:string">
88        <xs:annotation>
89            <xs:documentation>Version number of the standard name table this document conforms to.</xs:documentation>
90        </xs:annotation>
91    </xs:element>
92    <xs:element name="last_modified" type="xs:dateTime">
93        <xs:annotation>
94            <xs:documentation>Last modified datetime.</xs:documentation>
95        </xs:annotation>
96    </xs:element>
97        <xs:element name="standard_name_rules">
98                <xs:annotation>
99                        <xs:documentation>Top level element of the table.</xs:documentation>
100                </xs:annotation>
101                <xs:complexType>
102                        <xs:sequence>
103                                <xs:element ref="title"/>
104                                <xs:element ref="version_number"/>
105                                <xs:element ref="last_modified"/>
106                                <xs:element ref="institution"/>
107                                <xs:element ref="contact"/>
108                                <xs:element ref="rule" maxOccurs="unbounded"/>
109                        </xs:sequence>
110                </xs:complexType>
111        </xs:element>
112</xs:schema>