<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v5.4 U (http://www.xmlspy.com) by Gil Ross Met Office UK -->
<xs:schema targetNamespace="http://www.wmo.ch/web/www/metadata" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://www.w3.org/2003/XInclude" xmlns="http://www.wmo.ch/web/www/metadata" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.2">
	<xs:annotation>
		<xs:documentation> 
		Schema for the WMO Community Core Metadata Profile. Based on XML Schema and ISO 19115
		Implementation of Annex B.3.1 Extent Information
		Version 0.2
		Defined by Expert Team on Integrated Data Management 
		Second Meeting 13-16 May 2002 Shinfield England
		Third Meeting 15-18 December 2003 Geneva
		Fourth Meeting 1-3 September 2004 Geneva 
		</xs:documentation>
	</xs:annotation>
	<!-- Include code lists  -->
	<xs:include schemaLocation="./WMO19115_CodeLists_v0_2.xsd"/>
	<!-- Include basic types  -->
	<xs:include schemaLocation="./WMO19115_basicTypes_v0_2.xsd"/>
	<!-- Import XInclude schema-->
	<xs:import namespace="http://www.w3.org/2003/XInclude" schemaLocation="XInclude.xsd"/>
	<xs:complexType name="EX_ExtentType">
		<xs:annotation>
			<xs:documentation>EX_Extent Lines 335-338</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="description" minOccurs="0"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="geographicElement"/>
				<xs:element ref="temporalElement"/>
				<xs:element ref="verticalElement"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="horizontalCoordinateType" type="xs:string" default="WGS84">
			<xs:annotation>
				<xs:documentation>
				Added by ET-IDM-4. Eventually this should be a list of coordinate types and references, 
				but at present it is left as a free string with a default
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="EX_GeographicExtentType">
		<xs:annotation>
			<xs:documentation>EX_GeographicExtent Lines 340-349: geographic area of the dataset</xs:documentation>
		</xs:annotation>
		<xs:choice maxOccurs="unbounded">
			<xs:element ref="boundingBox"/>
			<xs:element ref="geographicIdentifier"/>
			<xs:element ref="polygon"/>
			<xs:element ref="irregularPointSet"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="EX_GeographicBoundingBoxType">
		<xs:annotation>
			<xs:documentation>EX_GeographicBoundingBox Lines 344-347
			Note that W3CXMLSchema on its own cannot enforce correctness bewteen
			west &lt; east or south &lt; north
			Also west and east numeric domains are restricted to +/- 180.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="westBoundLongitude"/>
			<xs:element ref="eastBoundLongitude"/>
			<xs:element ref="southBoundLatitude"/>
			<xs:element ref="northBoundLatitude"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="EX_TemporalExtentType">
		<xs:annotation>
			<xs:documentation>EX_TemporalExtent: time period covered by the dataset</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice maxOccurs="2">
				<xs:element ref="referenceDateTime"/>
				<xs:element ref="beginDateTime"/>
			</xs:choice>
			<xs:element ref="endDateTime" minOccurs="0"/>
			<xs:element ref="dataFrequency" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="EX_VerticalExtentType">
		<xs:annotation>
			<xs:documentation>EX_VerticalExtent Lines 355-358
			specifically the minimum must be less than or equal to the maximum value
			(although this caanot be enforced solely by W3CXMLSchema). 
			Negative values reflect below the datum which can be the surface or MeanSeaLevel etc.
			Non meteorologists should note that the third geometric co-ordinate may not literally be a vertical
			co-ordinate, but can be a parametric measure.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="minimumValue"/>
			<xs:element ref="maximumValue"/>
			<xs:element ref="unitOfMeasure"/>
			<xs:element ref="verticalDatumLevel" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PolygonType">
		<xs:annotation>
			<xs:documentation>set of points to define a polygon</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="point" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PointType">
		<xs:annotation>
			<xs:documentation>Latitude and longitude value</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="latitude"/>
			<xs:element ref="longitude"/>
		</xs:sequence>
	</xs:complexType>
	<!-- ********************************************************************************************************************* -->
	<!-- reference elements ______________________________________________________________ -->
	<!-- ********************************************************************************************************************* -->
	<xs:element name="description" type="xs:string"/>
	<xs:element name="geographicElement" type="EX_GeographicExtentType"/>
	<xs:element name="temporalElement" type="EX_TemporalExtentType"/>
	<xs:element name="verticalElement" type="EX_VerticalExtentType"/>
	<xs:element name="boundingBox" type="EX_GeographicBoundingBoxType"/>
	<xs:element name="geographicIdentifier">
		<xs:annotation>
			<xs:documentation>349: geographic identifier
						extended to allow an attribute link to a gazetteer
						</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:string">
					<xs:attribute name="gazetteer" type="xs:anyURI"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="polygon" type="PolygonType">
		<xs:annotation>
			<xs:documentation>342: set of points defining the bounding polygon</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="irregularPointSet">
		<xs:annotation>
			<xs:documentation>ET-IDM-4 addition (set of) point(s) with no implied connectivity</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="point" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="westBoundLongitude" type="LongitudeType"/>
	<xs:element name="eastBoundLongitude" type="LongitudeType"/>
	<xs:element name="southBoundLatitude" type="LatitudeType"/>
	<xs:element name="northBoundLatitude" type="LatitudeType"/>
	<xs:element name="referenceDateTime" type="dateAndTimeTypes">
		<xs:annotation>
			<xs:documentation>added by ETIDM: reference time of data This could be the creation date and time of a forecast with a different beginning and ending (Note this type is extended to allow different date or time types)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="beginDateTime" type="dateAndTimeTypes">
		<xs:annotation>
			<xs:documentation>added by ETIDM: start time of data (Note this type is extended to allow different date or time types)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="endDateTime" type="dateAndTimeTypes">
		<xs:annotation>
			<xs:documentation>added by ETIDM: end time of data. If not present implies continuing/no end time (Note this type is extended to allow different date or time types)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="dataFrequency" type="frequencyCodeType">
		<xs:annotation>
			<xs:documentation>added by ETIDM: Temporal repetition of data (e.g. hourly etc)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="minimumValue" type="xs:float">
		<xs:annotation>
			<xs:documentation>355: lowest vertical extent</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="maximumValue" type="xs:float">
		<xs:annotation>
			<xs:documentation>356: highest vertical extent</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="unitOfMeasure" type="xs:string">
		<xs:annotation>
			<xs:documentation>357: units of measure, e.g. metres, feet, hectopascal
					and type of vertical measure being used (e.g. height, geopotential, pressure or othewise)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="verticalDatumLevel" type="xs:string">
		<xs:annotation>
			<xs:documentation>additional element to allow redefinition of the datum level for vertical measurements</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="point" type="PointType">
		<xs:annotation>
			<xs:documentation>single point with latitude and longitude</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="latitude" type="LatitudeType"/>
	<xs:element name="longitude" type="LongitudeType"/>
</xs:schema>

