<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.heritage-standards.org.uk/midas/schema/1.1" elementFormDefault="qualified" version="1.1" id="midas_meta" xmlns:midas="http://www.heritage-standards.org.uk/midas/schema/1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!--Version 1.1 with corrected web address for schema -->
	<xs:include schemaLocation="midas_common.xsd"/>
	<xs:include schemaLocation="midas_temporal.xsd"/>
	<xs:include schemaLocation="midas_spatial.xsd"/>
	<xs:annotation>
		<xs:documentation>This is the metadata schema for the MIDAS standard, part of the FISH suite 
		of heritage data standards.  It is designed to accompany one or all parts of the MIDAS schema.
		The primary elements are: 
			(1) Contacts: contact information for the dataset
			(2) Rights: Rights and access information 
			(3) Source: Information about the source of the dataset.
			(4) Coverage: spatial and positional coverage
			(5) Generation: Information about the document's creation, incl. the query and result set if generated from a HEEP request.
		Note that this is designed to accommodate the metadata for a MIDAS dataset, and the metadata from HEEP capabilities documents</xs:documentation>
	</xs:annotation>
	<!-- start /meta -->
	<xs:element name="meta">
		<xs:annotation>
			<xs:documentation>Primary node for recording metadata for MIDAS heritage datasets and associated information.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<!-- START meta/title -->
				<xs:element name="title" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Title</xs:documentation>
					</xs:annotation>
				</xs:element>
				<!-- START meta/subject -->
				<xs:element name="subject" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Subject</xs:documentation>
					</xs:annotation>
				</xs:element>
				<!-- START meta/keywords -->
				<xs:element name="keywords" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Keywords</xs:documentation>
					</xs:annotation>
				</xs:element>
				<!-- START meta/contacts -->
				<xs:element name="contacts" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<!-- START contact -->
							<xs:group ref="midas:contact" minOccurs="0"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- START meta/rights (reference)-->
				<xs:group ref="midas:rights" minOccurs="0"/>
				<!-- START meta/source -->
				<xs:element name="source" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Data source</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<!-- START meta/source/statement -->
							<xs:element name="statement" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Statement about source</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- /END source -->
				<!-- START meta/creation -->
				<xs:element name="creation" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Information about the data's creation</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<!-- START meta/creation/createdon -->
							<xs:element name="createdon" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Date created</xs:documentation>
								</xs:annotation>
							</xs:element>
							<!-- START meta/creation/query -->
							<xs:element name="query" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Query used to generate data</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- /END source -->
				<!-- START meta/coverage -->
				<xs:element name="coverage" minOccurs="0">
					<xs:annotation>
						<xs:documentation/>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<!-- START meta/coverage/spatial -->
							<xs:element ref="midas:spatial" minOccurs="0"/>
							<!-- START meta/coverage/temporal -->
							<xs:element ref="midas:temporal" minOccurs="0"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- /END coverage -->
				<!-- START meta/abstract-->
				<xs:element name="abstract" minOccurs="0">
					<xs:annotation>
						<xs:documentation>A brief textual description or summary</xs:documentation>
					</xs:annotation>
				</xs:element>
				<!-- END meta/abstract-->
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

