<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Gil Ross (Met Office) -->
<!--W3C Schema generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com) Gil Ross Met Office-->
<!-- This is a instance of ISO19110 Geographic Information/Geomatics which details the Feature Catalogue model. 
It is intended to represent the WMO Volume 306 Manual on Codes Part A Alphanumeric Codes but should work for simple catalogues and content for fixed datasets or files or sets of datasets or files.
The inheritance model along with property type, feature operation,binding, constraint etc. is grossly simplified. 
The resultant model allows featureTypes to contain aggregated featureTypes and featureAttributes. 
The association roles asre therefore not specified, but should be read as 
featureType "may contain" other featureTypes and featureAttributes;
featureAttributes "are contained in" featureTypes .
-->
<xs:schema targetNamespace="http://www.wmo.ch/web/www/featurecatalogue" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.wmo.ch/web/www/featurecatalogue" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1">
	<xs:element name="featureCatalogue" type="FC_FeatureCatalogueType">
		<xs:annotation>
			<xs:documentation>B.1 A feature catalogue contains its identifcation and contact information, 
			and definition of some number of feature types with other information necessary for those definitions</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="FC_FeatureCatalogueType">
		<xs:annotation>
			<xs:documentation>B.1 A feature catalogue contains its identifcation and contact information, 
			and definition of some number of feature types with other information necessary for those definitions</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="catalogueName"/>
			<xs:element ref="catalogueScope"/>
			<xs:element ref="fieldOfApplication"/>
			<xs:element ref="versionNumber"/>
			<xs:element ref="versionDate"/>
			<xs:element ref="producer"/>
			<xs:element ref="functionalLanguage" minOccurs="0"/>
			<xs:element ref="featureType" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="FC_FeatureTypeType">
		<xs:annotation>
			<xs:documentation>B.2 Class or real world phenomena with common properties.
			In this version it should be read as a dataset type with common file contents</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:sequence>
				<xs:element ref="typeName"/>
				<xs:element ref="alias" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="definition"/>
				<xs:element ref="code"/>
				<xs:element ref="featureAttribute" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:element name="featureTypeReference" type="memberReferenceType">
				<xs:annotation>
					<xs:documentation>a reference to another featureType within the same catalogue.
					This is a shortcut to the 19110 aggregation model</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
		<xs:attribute name="id" type="xs:ID"/>
	</xs:complexType>
	<xs:complexType name="FC_FeatureAttributeType">
		<xs:annotation>
			<xs:documentation>B.8 Characteristic of a feature type.
			Here we mean a data elenent which, if it exists, is contained within the featureType file, dataset or container</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:sequence>
				<xs:element ref="memberName"/>
				<xs:element ref="definition" minOccurs="0"/>
				<xs:element ref="coverage" minOccurs="0"/>
			</xs:sequence>
			<xs:element name="memberReference" type="memberReferenceType">
				<xs:annotation>
					<xs:documentation>a reference to another feature attribute which should be regareded as a copy or an alias</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="memberReferenceType">
		<xs:annotation>
			<xs:documentation>a reference to another feature attribute which should be regareded as a copy or an alias</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="referenceID" type="xs:IDREF"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="memberNameType">
		<xs:annotation>
			<xs:documentation>B.8 This is the de-facto specification of featureAttribute. It uses attributes instead of elements for the identification and specification of the featureAttribute </xs:documentation>
			<xs:documentation>
 			id is the unique reference within the catalogue (originally code B.8.1)
 			units is otherwise B.8.2 valueMeasurementUnits and can be a list of allowable units
 			type is the variable type in the XMLSchema namespace. Note that many WMO 306 Alphanumeric elements are code values or integers embedded within a string, and therefore can't be properly trepresented by NMTOKEN.
                    codeName is an extension of B.8.3 listedValue to refer to code tables such as WMO 306 or BUFR code tables</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="idGroup"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:attributeGroup name="idGroup">
		<xs:attribute name="id" type="xs:ID"/>
		<xs:attribute name="units" type="xs:string" default="none"/>
		<xs:attribute name="type" type="xs:NMTOKEN" default="xs:string"/>
		<xs:attribute name="codeName" type="xs:string" default="none"/>
	</xs:attributeGroup>
	<xs:complexType name="coverageType">
		<xs:annotation>
			<xs:documentation>
This coverage feature list is set up for WMO GRIB coverage elements.
element variableField is the parameter which varies at each point of the grid
element fixedField is the level or layer parameter foxed at every point.
For example: Temperature varying at every grid point defined at a height level of 3000m
or conversely, the lowest height variable at each grid point at which the 0C temperature is crossed, if indeed it is crossed.
group coverageGeometry is a coding of the GRIB latitude-longitude grid definition translated to ISO terms
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="variableField"/>
			<xs:element ref="fixedField" maxOccurs="2"/>
			<xs:group ref="coverageGeometry" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:group name="coverageGeometry">
		<xs:annotation>
			<xs:documentation>
This group is a coding of the GRIB latitude-longitude grid definition translated to ISO terms in a similar manner to ISO19123
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="corner1Lat"/>
			<xs:element ref="corner1Lon"/>
			<xs:element ref="corner2Lat"/>
			<xs:element ref="corner2Lon"/>
			<xs:element ref="deltaLat"/>
			<xs:element ref="deltaLon"/>
			<xs:element ref="numberLatPoints"/>
			<xs:element ref="numberLonPoints"/>
			<xs:element ref="scanning"/>
		</xs:sequence>
	</xs:group>
	<!-- ********************************************************************************************************************* -->
	<!-- reference elements ______________________________________________________________ -->
	<!-- ********************************************************************************************************************* -->
	<xs:element name="featureType" type="FC_FeatureTypeType">
		<xs:annotation>
			<xs:documentation>B.2 Class or real world phenomena with common properties.
			In this version it should be read as a dataset type with common file contents</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="featureAttribute" type="FC_FeatureAttributeType">
		<xs:annotation>
			<xs:documentation>B.8 Characteristic of a feature type.
			Here we mean a data elenent which, if it exists, is contained within the featureType file, dataset or container</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="alias" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.2.5 equivalent name ( to typeName) by which the featureType is known </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="catalogueName" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.1 The common name for the feature catalogue</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="catalogueScope" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.2 Subject domain(s) of the feeature types contained in this feature catalogue</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="code" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.2.3 This is included to store the code value of the alphanumeric code = e.g. M_iM_iM_jM_j in WMO vol 306. 
			Here we usurp the definition of "code" within 19110 and use the xml attribute "id" to refer uniquely to the feature within the catalogue</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="definition" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.2.2 definition of the feature type (extended also to feature attribute) in natural language or alternatively a reference or citation where this may be found. </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="coverage" type="coverageType">
		<xs:annotation>
			<xs:documentation>Here the coverage is defined within a feature attribute 
			</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="featureTypeList" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.8 list of feature types </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="fieldOfApplication" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.3 Description of kind(s) of use to which this feeature catalogue may be put </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="functionalLanguage" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.7 the formal functional language in which the feature operation formal definition occurs in this feature catalogue.
			As this feature catalogue is posited to be a dataset description form, with no application functinonality, this is not relevant </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="memberName" type="memberNameType">
		<xs:annotation>
			<xs:documentation>>B.8 This is the de-facto specification of featureAttribute </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="producer" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.6 Name, address, country and email address of person or organisation having primary responsibility for the intellectual content of this feature catalogue </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="typeName" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.2.1 text string which uniquely identifies this feature type within the feature catalogue that contains the feature type </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="versionDate" type="xs:dateTime">
		<xs:annotation>
			<xs:documentation>B.1.5 effective date of this feature catalogue </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="versionNumber" type="xs:string">
		<xs:annotation>
			<xs:documentation>B.1.4 version number of this feature catalogue which may include major and minor versions </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="variableField" type="xs:string"/>
	<xs:element name="fixedField" type="xs:string"/>
	<xs:element name="corner1Lat" type="xs:decimal"/>
	<xs:element name="corner1Lon" type="xs:decimal"/>
	<xs:element name="corner2Lat" type="xs:decimal"/>
	<xs:element name="corner2Lon" type="xs:decimal"/>
	<xs:element name="deltaLat" type="xs:decimal"/>
	<xs:element name="deltaLon" type="xs:decimal"/>
	<xs:element name="numberLatPoints" type="xs:decimal"/>
	<xs:element name="numberLonPoints" type="xs:decimal"/>
	<xs:element name="scanning" type="xs:string"/>
</xs:schema>

