<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- IUGS/CGI GeoSciML schema, ver. 1 - draft 2005-10-19 -->
<!-- Contains the concepts (classes), their inheritance, and relations from the CGI_Metadata package of the GeoSciML model -->
<!-- GeoSciML Testbed-2 Model -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:gsml="http://www.cgi-iugs.org/xml/GeoSciML/1" targetNamespace="http://www.cgi-iugs.org/xml/GeoSciML/1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
	<annotation>
		<documentation>metadata.xsd
Basic metadata components for GeoSciML
covering 	dataset and object metadata

These should be updated to use ISO 19139 components when that is properly supported by the tooling.</documentation>
	</annotation>
	<!--=======================-->
	<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
	<!--=======================-->
	<include schemaLocation="CGI_Value.xsd"/>
	<!--=======================-->
	<complexType name="MetadataType">
		<annotation>
			<documentation>Should be derived from MD_Metadata</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="hierarchyLevel" type="gsml:Metadata_ScopeCode"/>
					<element name="parent" type="gml:ReferenceType" minOccurs="0"/>
					<element name="sourceReference" type="gml:ReferenceType" maxOccurs="unbounded"/>
					<element name="comment" type="gml:StringOrRefType" minOccurs="0">
						<annotation>
							<documentation>Container for commentary that may not be strictly part of a "description".</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ..................... -->
	<element name="Metadata" type="gsml:MetadataType" substitutionGroup="gml:_GML"/>
	<!-- ..................... -->
	<complexType name="MetadataPropertyType">
		<sequence minOccurs="0">
			<element ref="gsml:Metadata"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!--=======================-->
	<complexType name="MappedFeatureMetadataType">
		<complexContent>
			<extension base="gsml:MetadataType">
				<sequence>
					<element name="positionalAccuracy" type="gsml:CGI_ValuePropertyType"/>
					<element name="observationMethod" type="gsml:CGI_ValuePropertyType" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ..................... -->
	<element name="MappedFeatureMetadata" type="gsml:MappedFeatureMetadataType" substitutionGroup="gsml:Metadata"/>
	<!-- ..................... -->
	<complexType name="MappedFeatureMetadataPropertyType">
		<sequence minOccurs="0">
			<element ref="gsml:MappedFeatureMetadata"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!--=======================-->
	<complexType name="GeologicFeatureMetadataType">
		<complexContent>
			<extension base="gsml:MetadataType">
				<sequence>
					<element name="thematicAccuracy" type="gsml:CGI_ValuePropertyType"/>
					<element name="observationMethod" type="gsml:CGI_ValuePropertyType" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ..................... -->
	<element name="GeologicFeatureMetadata" type="gsml:GeologicFeatureMetadataType" substitutionGroup="gsml:Metadata"/>
	<!-- ..................... -->
	<complexType name="GeologicFeatureMetadataPropertyType">
		<sequence minOccurs="0">
			<element ref="gsml:GeologicFeatureMetadata"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!--=======================-->
	<simpleType name="Metadata_ScopeCode">
		<annotation>
			<documentation>Codes for metadata hierarchyklevel</documentation>
		</annotation>
		<union>
			<simpleType>
				<restriction base="string">
					<enumeration value="attribute" id="attribute">
						<annotation>
							<documentation>attribute</documentation>
						</annotation>
					</enumeration>
					<enumeration value="collectionSession" id="collectionSession">
						<annotation>
							<documentation>collectionSession</documentation>
						</annotation>
					</enumeration>
					<enumeration value="dataset" id="dataset">
						<annotation>
							<documentation>dataset</documentation>
						</annotation>
					</enumeration>
					<enumeration value="feature" id="feature">
						<annotation>
							<documentation>feature</documentation>
						</annotation>
					</enumeration>
					<enumeration value="fieldSession" id="fieldSession">
						<annotation>
							<documentation>fieldSession</documentation>
						</annotation>
					</enumeration>
					<enumeration value="model" id="model">
						<annotation>
							<documentation>model</documentation>
						</annotation>
					</enumeration>
					<enumeration value="nonGeographicDataset" id="nonGeographicDataset">
						<annotation>
							<documentation>nonGeographicDataset</documentation>
						</annotation>
					</enumeration>
					<enumeration value="series" id="series">
						<annotation>
							<documentation>series</documentation>
						</annotation>
					</enumeration>
					<enumeration value="service" id="service">
						<annotation>
							<documentation>Service</documentation>
						</annotation>
					</enumeration>
				</restriction>
			</simpleType>
			<simpleType>
				<restriction base="token">
					<pattern value="other:\w{2,}"/>
				</restriction>
			</simpleType>
		</union>
	</simpleType>
	<!--=======================-->
</schema>
