<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.heritage-standards.org/midas/schema/1.0" version="1.0" elementFormDefault="qualified" id="midas_temporal" xmlns:midas="http://www.heritage-standards.org/midas/schema/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:annotation>
		<xs:documentation>This is the Temporal Schema for the MIDAS standard, part of the FISH suite of XML schemas for the historic environment.  One temporal entity can consist of multiple spans.  Each span has elements for documenting information about its start, end, and duration.</xs:documentation>
	</xs:annotation>
	<!-- Type definition for timespan qualifiers -->
	<xs:simpleType name="spanqualifier">
		<xs:restriction base="xs:string">
			<xs:enumeration value="occasionally"/>
			<xs:enumeration value="throughout"/>
			<xs:enumeration value="between"/>
			<xs:enumeration value="pre"/>
			<xs:enumeration value="post"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- Begin root note /temporal -->
	<xs:element name="temporal">
		<xs:annotation>
			<xs:documentation>Element for recording temporal information relating to monuments and events associated with them..</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<!-- Begin /temporal/span -->
				<xs:element name="span" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>A temporal record can have multiple spans (it can stop and start more than once).</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<!-- Begin /temporal/span/display -->
							<xs:element name="display" minOccurs="0">
								<xs:annotation>
									<xs:documentation>How this span is called. Consists of multiple appellations with type identifiers.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /temporal/span/display/appellation -->
										<xs:element name="appellation" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Contains a single name or identifier for the span.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="type"/>
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<!-- Begin /temporal/span/start -->
							<xs:element name="start" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Information about the beginning or start of this span.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /temporal/span/start/appellation -->
										<xs:element name="appellation" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Contains a single name or identifier for the start of the span.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="type"/>
														<xs:attribute name="qualifier"/>
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<!-- Begin /temporal/span/duration -->
							<xs:element name="duration" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Information about the duration or length of this span.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /temporal/span/duration/length -->
										<xs:element name="length" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Contains information about the length of the span.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="unit"/>
														<xs:attribute name="qualifier"/>
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<!-- Begin /temporal/span/end -->
							<xs:element name="end" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Information about the end of this span.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /temporal/span/start/appellation -->
										<xs:element name="appellation" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Contains a single name or identifier for the end of the span.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="type"/>
														<xs:attribute name="qualifier"/>
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="qualifier" type="midas:spanqualifier"/>
					</xs:complexType>
					<!-- End /temporal/span -->
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- End /temporal -->
</xs:schema>

