<?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" attributeFormDefault="unqualified" version="2.0" id="midas_casework">
	<!--Version 2.0 with corrected web address for schema -->
	<xs:include schemaLocation="midas_common.xsd"/>
	<xs:include schemaLocation="midas_meta.xsd"/>
	<xs:include schemaLocation="midas_actor.xsd"/>
	<xs:include schemaLocation="midas_temporal.xsd"/>
	<xs:annotation>
		<xs:documentation>This is the casework schema for MIDAS XML.  It is used to record decisions and their outcomes relating to monument management. These might typically include planning applications considered by an HER, or which are being monitored by, e.g. an amenity group with statutory consultation authorities such as the Victorian society, grant applications received by a funding body e.g. for restoration of a historic building.
</xs:documentation>
	</xs:annotation>
	<!-- Begin /casework root element -->
	<xs:element name="casework">
		<xs:annotation>
			<xs:documentation>Root casework element</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<!-- Begin /casework/meta (documents entire collection of reference records)-->
				<xs:element ref="midas:meta" minOccurs="0"/>
				<!-- Begin /casework/case -->
				<xs:element name="case" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Element for recording single casework  associated with one or more monuments.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<!-- Begin /casework/case/recordmetadata -->
							<xs:group ref="midas:recordmetadata"/>
							<!-- Begin /casework/case/appellation -->
							<xs:group ref="midas:appellation" maxOccurs="unbounded"/>
							<!-- Begin /casework/case/spatial  -->
							<xs:element ref="midas:spatial" minOccurs="0"/>
							<!-- Begin /casework/case/actors -->
							<xs:element name="actors" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Element used to hold one or more actor elements (organisations or people) involved with the casework, and their role.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /casework/case/actors/actor  -->
										<xs:element ref="midas:actor" minOccurs="0" maxOccurs="unbounded"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<!-- Begin /casework/case/description (description)-->
							<xs:group ref="midas:description"/>
							<!-- Begin /casework/case/characters -->
							<xs:element name="characters" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Element used to hold one or more character elements, used to describe the character of the casework role.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /casework/case/characters/character  -->
										<xs:element name="character" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Empty element for documenting the nature of the proposal received.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:sequence>
													<!-- Begin /casework/case/characters/character/consultation  -->
													<xs:element name="consultation">
														<xs:annotation>
															<xs:documentation>The context in which consultation of the historic environment inventory occurs (for example "planning application"), using the optional 'type' attribute. (ALGAOConsType_1)</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 /casework/case/characters/character/workproposed  -->
													<xs:element name="workproposed" maxOccurs="unbounded">
														<xs:annotation>
															<xs:documentation>Nature of the work proposed (for example "housing development"), using the optional 'type' attribute. (ALGAOWorkProposed)</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>
										<!-- end character -->
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<!-- end characters -->
							<!-- Begin /casework/case/decision -->
							<xs:element name="decision" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Empty element used for recording the decision making and advice of the historic environment inventory manager or advisor, to appropriate decision making bodies and the eventual outcome..</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<!-- Begin /casework/case/decision/datereceived -->
										<xs:element name="datereceived">
											<xs:annotation>
												<xs:documentation>Date the proposal was received for advice</xs:documentation>
											</xs:annotation>
										</xs:element>
										<!-- Begin /casework/case/decision/recommendation  -->
										<xs:element name="recommendation">
											<xs:annotation>
												<xs:documentation>Recommendation made by the HE inventory manager relating to the proposal.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<!-- Begin /casework/case/decision/dateofrecommendation -->
										<xs:element name="dateofrecommendation">
											<xs:annotation>
												<xs:documentation>Date of issue of the recommendation.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<!-- Begin /casework/case/decision/outcome  -->
										<xs:element name="outcome" minOccurs="0">
											<xs:annotation>
												<xs:documentation>The response to the recommendation made by the relevant decision making body. (ALGAOOutcome)</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 /casework/case/finaloutcome   -->
										<xs:element name="finaloutcome" minOccurs="0">
											<xs:annotation>
												<xs:documentation>Action taken by the relevant decision making body in respect of the proposal (ALGAOFinalOutcome)</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>
							<!-- end decision -->
							<!-- Begin /casework/case/note -->
							<xs:element name="note" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>Element for recording diverse, additional information about the casework, categorised by the  optional 'type' attribute .</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 /casework/case/related (casework)-->
							<xs:group ref="midas:related"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- end /casework/case -->
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- end /casework -->
</xs:schema>

