<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:midas="http://www.heritage-standards.org.uk/midas/schema/2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.heritage-standards.org.uk/midas/schema/2.0" elementFormDefault="qualified" version="2.0" id="midas_common">
	<!--Version 2.0 with corrected web address for schema -->
	<xs:annotation>
		<xs:documentation>This is the Common Schema for the MIDAS standard, part of the FISH suite of XML schemas for the historic environment.  It is designed to hold groups and elements that are common to the other MIDAS schema.</xs:documentation>
	</xs:annotation>
	<!-- Type definition for relationship types -->
	<xs:simpleType name="reltype">
		<xs:restriction base="xs:string">
			<xs:enumeration value="includes"/>
			<xs:enumeration value="part of"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- Begin group appellation this is strict appelation group with all mondatory elements-->
	<xs:group name="appellation">
		<xs:sequence>
			<xs:element name="appellation">
				<xs:annotation>
					<xs:documentation>Element holds names and identifiers of of MIDAS entities. Repeat as required.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- Begin /appellation/name -->
						<xs:element name="name" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Records human-readable name(s) of MIDAS entities.</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="type"/>
										<xs:attribute name="preferred"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /appellation/identifier -->
						<xs:element name="identifier" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Records numeric or alpha-numeric identifier. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="type"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- Begin /description -->
	<xs:group name="description">
		<xs:sequence>
			<xs:element name="description">
				<xs:annotation>
					<xs:documentation>Text descriptions, full and summary.  A single element can have as many of these description pairs as required. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- Begin /description/full -->
						<xs:element name="full" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Full description.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /description/summary -->
						<xs:element name="summary" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Summary description. Note that a summary description cannot exist without a full description. i.e., the summary is a summary of an extant description, and not simply indicative of its length: if the only description you have is one sentence, then it belongs in the 'full' element. </xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="source"/>
					<xs:attribute name="audience"/>
					<xs:attribute name="preferred" type="xs:boolean"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- Begin /contact -->
	<xs:group name="contact">
		<xs:sequence>
			<!-- Begin /contact -->
			<xs:element name="contact">
				<xs:annotation>
					<xs:documentation>Contact information for a actor, resource, or service capability </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- Begin /contact/name -->
						<xs:element name="name" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Collective name element.</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<!-- Begin /contact/name/title -->
									<xs:element name="title" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Mr, Dr, Mrs, etc.</xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- Begin /contact/name/firstname -->
									<xs:element name="firstname" minOccurs="0">
										<xs:annotation>
											<xs:documentation>First name</xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- Begin /contact/name/lastname -->
									<xs:element name="lastname" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Last name/surname</xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- Begin /contact/name/othername -->
									<xs:element name="othername" minOccurs="0" maxOccurs="unbounded">
										<xs:annotation>
											<xs:documentation>Other name(s)</xs:documentation>
										</xs:annotation>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<!-- Begin /contact/organisation -->
						<xs:element name="organisation" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Organisation Name</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /contact/role -->
						<xs:element name="role" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Role or roles of contact.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /contact/address (reference)-->
						<xs:group ref="midas:address" minOccurs="0" maxOccurs="unbounded"/>
						<!-- Begin /contact/phone -->
						<xs:element name="phone" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Phone number(s)</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>
						<!-- Begin /contact/fax -->
						<xs:element name="fax" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Fax number(s)</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /contact/email -->
						<xs:element name="email" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Email(s)</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="type" type="xs:string"/>
					<!-- Use with Contact Point(contact). Example: WORK EMAIL ADDRESS; HOME POSTAL ADDRESS-->
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- Begin group address -->
	<xs:group name="address">
		<xs:sequence>
			<xs:element name="address" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Element for internationally transferable postal references; its nodes are largely self explanatory. This is restricted to postal elements onl. Use the spatial schema for other named places outside of the address. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- Begin /address/streetaddress -->
						<xs:element name="streetaddress" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Street address: "27 Jericho St", etc.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /address/city -->
						<xs:element name="city" minOccurs="0">
							<xs:annotation>
								<xs:documentation>City</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /address/stateorprovince -->
						<xs:element name="adminarea" minOccurs="0">
							<xs:annotation>
								<xs:documentation>State, Province, Region or County</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /address/postcode -->
						<xs:element name="postcode" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Postcode or zipcode</xs:documentation>
							</xs:annotation>
						</xs:element>
						<!-- Begin /address/country -->
						<xs:element name="country" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Country (i.e. 'UK', not 'England', 'Wales', 'NI' or 'Scotland')</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- START group rights -->
	<xs:group name="rights">
		<xs:sequence>
			<!-- START rights -->
			<xs:element name="rights" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Copyright, access, reproduction and control rights.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- START rights/copyright -->
						<xs:element name="copyright" minOccurs="0">
							<xs:annotation>
								<xs:documentation/>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="holder" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Copyright holder</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="year" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Copyright year(s)</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="statement" minOccurs="0">
										<xs:annotation>
											<xs:documentation>General, free text copyright info</xs:documentation>
										</xs:annotation>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<!-- START rights/accessrights -->
						<xs:element name="accessrights" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Documents who is allowed to use the data, and how</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="grantedto" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Access grated to whom</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="conditions" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Access conditions statement</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="datefrom" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Date access granted</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="dateto" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Date access revoked</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="statement" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Statement regarding access rights</xs:documentation>
										</xs:annotation>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<!-- START rights/reproductionrights -->
						<xs:element name="reproductionrights" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Reproduction rights</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<!-- START rights/reproductionrights/statement -->
									<xs:element name="statement" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Reproduction statement</xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- START rights/reproductionrights/contact -->
									<xs:element name="contact" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Who to contact regarding reproduction</xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- START rights/reproductionrights/contact -->
									<xs:element name="fees" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Indicative fees for reproduction</xs:documentation>
										</xs:annotation>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- START group related -->
	<xs:group name="related">
		<xs:sequence>
			<!-- Begin /related -->
			<xs:element name="related">
				<xs:annotation>
					<xs:documentation>This element records the links for related MIDAS entities.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- Begin /related/has_event -->
						<xs:element name="has_event" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related events. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_monument -->
						<xs:element name="has_monument" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related monuments. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_resource -->
						<xs:element name="has_resource" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related references (the namespace attribute is required). </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
										<xs:attribute name="linkref">
											<xs:annotation>
												<xs:documentation>Use this attribute to record the identifier used refer to this reference in the description or other textual element.  Free text monument record descriptions usually cite references as [1], [2], etc., and this attribute is designed to capture that monument-specific identifier to maintain the link between the reference and the monument description.	
											</xs:documentation>
											</xs:annotation>
										</xs:attribute>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<xs:element name="has_object" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the IDs for related objects/artefacts (the namespace attribute is required). </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
										<xs:attribute name="linkref">
											<xs:annotation>
												<xs:documentation>Use this attribute to record the identifier used refer to this reference in the description or other textual element.  Free text monument record descriptions usually cite references as [1], [2], etc., and this attribute is designed to capture that monument-specific identifier to maintain the link between the reference and the monument description.	
											</xs:documentation>
											</xs:annotation>
										</xs:attribute>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_casework -->
						<xs:element name="has_casework" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related caswork info. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_area -->
						<xs:element name="has_area" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related Areas. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_assetmanagements -->
						<xs:element name="has_assetmanagement" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related Heritage Asset Management. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_designations -->
						<xs:element name="has_designation" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related Designation and Protections. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_historicalevents -->
						<xs:element name="has_historicalevent" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related Historical Events. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_managementactivitydocumentation -->
						<xs:element name="has_managementactivitydocumentation" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related Management Activity Documentation. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
						<!-- Begin /related/has_narrative -->
						<xs:element name="has_narrative" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>This element records the ids for related Narrative and Synthesis. The namespace attribute is required. </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="xs:string">
										<xs:attribute name="namespace" use="required"/>
										<xs:attribute name="reltype" type="midas:reltype"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- START group recordmetadata -->
	<xs:group name="recordmetadata">
		<xs:sequence>
			<!-- Begin /recordmetadata -->
			<xs:element name="recordmetadata">
				<xs:annotation>
					<xs:documentation>Element for recording information about this specific record.  To avoid confusion: use the midas_meta schema re record information about an entire dataset.  Use this element to record information specific to a single record.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<!-- Begin /recordmetadata/created -->
						<xs:element name="created" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Information relating to the creation of this particular record (not this particular electronic incarnation, but the compilation date of the data). </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<!-- Begin /recordmetadata/created/createdon -->
									<xs:element name="createdon" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Date the record was created . </xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- Begin /recordmetadata/created/createdby -->
									<xs:element name="createdby" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Who created the record.</xs:documentation>
										</xs:annotation>
										<xs:complexType>
											<xs:group ref="midas:appellation" minOccurs="0"/>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<!-- Begin /recordmetadata/lastupdated -->
						<xs:element name="lastupdated" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Information relating to the last update of this particular record (not this particular electronic incarnation, but rather the last change to the data itself). </xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<!-- Begin /recordmetadata/lastupdated/lastupdatedon -->
									<xs:element name="lastupdatedon" minOccurs="0">
										<xs:annotation>
											<xs:documentation>When the the data were last updated. </xs:documentation>
										</xs:annotation>
									</xs:element>
									<!-- Begin /recordmetadata/lastupdated/lastupdatedby -->
									<xs:element name="lastupdatedby" minOccurs="0">
										<xs:annotation>
											<xs:documentation>Who was last to update the data.</xs:documentation>
										</xs:annotation>
										<xs:complexType>
											<xs:sequence>
												<xs:group ref="midas:appellation" minOccurs="0"/>
											</xs:sequence>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- START group language (New for the MIDAS XML Schema ver 2.0) -->
	<xs:group name="language">
		<!-- Begin /language-->
		<xs:sequence>
			<xs:element name="language" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The language of the intellectual content of an information source. Used with Information Source entries to identify the language of the content, or Location and Monument entry data to record the language of place names, and distinguish, for example, Welsh from English versions. Example: En-GB (for English spelling as used in Great Britain).</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<!-- Start element rightnote (New for the MIDAS XML Schema ver 2.0) -->
	<xs:element name="rightnote">
		<xs:annotation>
			<xs:documentation>Example: © HERITAGETEACH 2008</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="type"/>
		</xs:complexType>
	</xs:element>
	<!-- Start element informationsourcetitle (New for the MIDAS XML Schema ver 2.0) -->
	<xs:element name="informationsourcetitle">
		<xs:annotation>
			<xs:documentation>Records the Information Source Title.</xs:documentation>
		</xs:annotation>
	</xs:element>
</xs:schema>

