<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 rel. 3 sp1 (http://www.altova.com) by JJS (NAVAL AIR WARFARE CTR AIRCRAFT DIVISION) -->
<xs:schema xmlns="http://www.ieee.org/ATML/2007/07/MAI" xmlns:c="http://www.ieee.org/ATML/2007/02/Common" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ieee.org/ATML/2007/07/MAI" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.11">
	<xs:import namespace="http://www.ieee.org/ATML/2007/02/Common" schemaLocation="Common.xsd"/>
	<xs:element name="MAI">
		<xs:annotation>
			<xs:documentation>This schema defines the information required by maintenance personnel when a system requires maintenance. </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ParentSystem" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Identifies the UUT's parent system, subsystem, major component, subassembly or part of the end item. </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="systemName" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation>Name of the system relevant to the action</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="systemIdentifier" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation>Identifier related to the system</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="systemSerialNumber" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation>Serial number needed to identify the system</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="systemMAI" type="c:Uuid">
							<xs:annotation>
								<xs:documentation>Most recent MAI instance document for the parent system</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:choice>
					<xs:annotation>
						<xs:documentation>The MAI responds to whether or not the issue is software or hardware related based on the choice made here. </xs:documentation>
					</xs:annotation>
					<xs:element name="HardwareMaintained" type="c:HardwareInstance"/>
					<xs:element name="SoftwareMaintained" type="c:SoftwareInstance"/>
				</xs:choice>
				<xs:choice>
					<xs:annotation>
						<xs:documentation>Choice allows for two different maintenance scenarios.  If General Maintenance is selected, no discrepancy should occur.  If there is a discrepancy, then a reactive maintenance must be performed.</xs:documentation>
					</xs:annotation>
					<xs:element name="GeneralMaintenance" type="Maintenance">
						<xs:annotation>
							<xs:documentation>Scheduled or unscheduled maintenance not related to a detected fault.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ReactiveMaintenance">
						<xs:annotation>
							<xs:documentation>Maintenance related to a detected fault</xs:documentation>
						</xs:annotation>
						<xs:complexType>
							<xs:complexContent>
								<xs:extension base="Maintenance">
									<xs:sequence>
										<xs:element name="Basis" type="Basis">
											<xs:annotation>
												<xs:documentation>The cause(s) that lead to a reactive maintenance action</xs:documentation>
											</xs:annotation>
										</xs:element>
									</xs:sequence>
								</xs:extension>
							</xs:complexContent>
						</xs:complexType>
					</xs:element>
				</xs:choice>
				<xs:element name="Resources">
					<xs:annotation>
						<xs:documentation>All necessary information (equipment data, personnel, training needs, etc) used during the maintenance action</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="EquipmentData" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>A description of any equipment required to complete the maintenance 
action. This can be either a document reference or an actual description 
of the equipment.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:choice>
											<xs:element name="EquipmentDescriptionReference" type="c:DocumentReference">
												<xs:annotation>
													<xs:documentation>Used to reference, by uuid, an equipment description related to the maintenance action</xs:documentation>
												</xs:annotation>
											</xs:element>
											<xs:element name="EquipmentDescription" type="c:ItemDescription">
												<xs:annotation>
													<xs:documentation>Intended to capture all information about the equipment required to complete the repair</xs:documentation>
												</xs:annotation>
											</xs:element>
										</xs:choice>
										<xs:element name="EquipmentWarranty" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Equipment support program</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:attributeGroup ref="Warranty"/>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="SupplyChainTransaction" type="c:Document" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>The collection of information that  fully document a request or receipt of assets  required to complete the maintenance action.</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="Personnel" type="Person" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>Used to capture information about the person(s) performing the maintenance action on the item. </xs:documentation>
								</xs:annotation>
								<xs:key name="personAssigned">
									<xs:selector xpath=".//Personnel"/>
									<xs:field xpath="@name"/>
								</xs:key>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="HistoricalMAI" type="c:DocumentReference" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>This points to an instance of the MAI document from the prior maintenance action for this UUT</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="MaintenanceActionStatus">
					<xs:annotation>
						<xs:documentation>Describes the state of the UUT resulting from the maintenance tasks performed on it</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="resultStatus" use="required">
							<xs:annotation>
								<xs:documentation>Provides the result of a maintenance action that has been performed</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="In Work"/>
									<xs:enumeration value="Awaiting Resources"/>
									<xs:enumeration value="Incomplete"/>
									<xs:enumeration value="Complete"/>
									<xs:enumeration value="RFI"/>
									<xs:enumeration value="Recertification"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="resultQualifier" type="c:NonBlankString" use="optional">
							<xs:annotation>
								<xs:documentation>Provides a description of the maintenance action result to better describe the nature of the result</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="uuid" type="c:Uuid" use="required"/>
			<xs:attribute name="documentControl" type="c:NonBlankString" use="optional">
				<xs:annotation>
					<xs:documentation>This is the identifier for the document  e.g. job control number, sequence number etc.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="timeStamp" type="xs:dateTime" use="required">
				<xs:annotation>
					<xs:documentation>Date/time when the MAI process begins.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="documentDescription" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>The document description describes the maintenance action task.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="maintenanceTime" type="xs:duration" use="required">
				<xs:annotation>
					<xs:documentation>Intended to capture actual duration of entire MAI process.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="operatingOrganization" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>The organization that is responsible for the operation of the system.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="maintenanceOrganization" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>The organization that is responsible for the maintenance of the system.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="topLevelEntity" type="xs:boolean" use="required">
				<xs:annotation>
					<xs:documentation>IF topLevelEntity=true, the ParentSystem child does not exist, ELSE ParentSystem child does exist. </xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="MaintenanceAction">
		<xs:annotation>
			<xs:documentation>The effort required to complete a maintenance task</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="c:ItemInstance">
				<xs:sequence>
					<xs:element name="PersonAssigned" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Points to a Personnel attribute to obtain information about the name of the employee that performed the maintenance action</xs:documentation>
						</xs:annotation>
						<xs:complexType>
							<xs:attribute name="name" type="c:NonBlankString" use="required">
								<xs:annotation>
									<xs:documentation>References the name of the person assigned to a maintenance task</xs:documentation>
								</xs:annotation>
							</xs:attribute>
						</xs:complexType>
						<xs:keyref name="personRef" refer="personAssigned">
							<xs:selector xpath=".//PersonAssigned/name"/>
							<xs:field xpath="@name"/>
						</xs:keyref>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="maintenanceStartTime" type="xs:dateTime" use="required">
					<xs:annotation>
						<xs:documentation>Date/time when the maintenance event on the unit begins</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="maintenanceActionTime" type="xs:duration" use="required">
					<xs:annotation>
						<xs:documentation>Captures actual work duration of the maintenance event</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="maintenanceEndTime" type="xs:dateTime">
					<xs:annotation>
						<xs:documentation>Date/time when the maintenance event on the unit ends</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="Basis">
		<xs:annotation>
			<xs:documentation>Describes the diagnostic information used to determine the reason for initiating the maintenance action.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="AssociatedTestResults" type="c:DocumentReference">
					<xs:annotation>
						<xs:documentation>Refers to a TestResults instance document containing the results of tests performed to identify the cause of the discrepancy. identifies one or more SIMICA Test Results documents recording tests that were performed on the UUT.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="NonstandardTestResult" type="c:NonBlankString">
					<xs:annotation>
						<xs:documentation>This includes test information used to initiate the maintenance actions not covered by the test result schema. Identifies any tests results applicable to the UUT that were not documented using IEEE Std 1636.1. This should include test information used to initiate the maintenance action e.g. user debrief, BIT codes, symptoms, MUA, environmental and performance data or tests from the previous level. </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="AssociatedFailureCode">
					<xs:annotation>
						<xs:documentation>This element will be used to report a failure code associated with the parent cause element, including the no fault code. </xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="c:NonBlankString">
							<xs:minLength value="1"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
			</xs:choice>
			<xs:element name="AssociatedDiagnosticResult" type="c:DocumentReference" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Refers to an AI-ESTATE instance document containing the results of a diagnostic session performed on the UUT</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="reportedBy" use="required">
			<xs:annotation>
				<xs:documentation>The name of the person or system who reported a discrepancy or cause of the need for a maintenance action</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="System"/>
					<xs:enumeration value="Operator"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="whenDiscovered" type="xs:dateTime" use="optional">
			<xs:annotation>
				<xs:documentation>Date/time when the need for corrective action was discovered</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Contact">
		<xs:annotation>
			<xs:documentation>Identification information for a person.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Address" type="c:MailingAddress" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Provides the mailing address for a particular person</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="name" type="c:NonBlankString" use="required">
			<xs:annotation>
				<xs:documentation>A string value representing the name of the operator</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="affiliation" type="c:NonBlankString" use="optional">
			<xs:annotation>
				<xs:documentation>Identifies the organizational affiliation of a particular person.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="email" type="c:NonBlankString" use="optional">
			<xs:annotation>
				<xs:documentation>A string value representing the email of the operator.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="phone" type="c:NonBlankString" use="optional">
			<xs:annotation>
				<xs:documentation>A string value representing the phone number of the operator.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Maintenance">
		<xs:annotation>
			<xs:documentation>The maintenance action taken as a result of the MAI</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="ActionPerformed" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>For each maintenance element, one or more actions taken as a result of the required maintenance.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:choice>
						<xs:annotation>
							<xs:documentation>This choice is necessary, as an instance document will either document the action resulting from maintenance or will capture the reason for non-action.</xs:documentation>
						</xs:annotation>
						<xs:element name="RepairAction" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Work required to restore the unit to an operational state. When something is repaired, this element lists details on the part repaired.</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:complexContent>
									<xs:extension base="MaintenanceAction"/>
								</xs:complexContent>
							</xs:complexType>
						</xs:element>
						<xs:element name="RemoveAction" type="MaintenanceAction" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>The removal of a component required to complete the maintenance action.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="InstallAction" type="MaintenanceAction" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Installation of a component required to complete the maintenance action.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="NoAction">
							<xs:annotation>
								<xs:documentation>The reason for not being able to perform the required maintenance on the unit. At least one of the attributes MUST be required or this adds no value.</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:attribute name="nonActionCode" type="c:NonBlankString" use="optional">
									<xs:annotation>
										<xs:documentation>Code that best describes the reason for not being able to take corrective action</xs:documentation>
									</xs:annotation>
								</xs:attribute>
								<xs:attribute name="description" type="xs:string" use="optional">
									<xs:annotation>
										<xs:documentation>Enter detailed description of reason for not being able to take corrective action</xs:documentation>
									</xs:annotation>
								</xs:attribute>
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="MaintenanceDelay" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>This is for record-keeping only and is used after the maintenance is performed to document reason(s) for the awaiting maintenance time. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:attribute name="awaitingMaintCode" type="c:NonBlankString" use="optional">
						<xs:annotation>
							<xs:documentation>Code that describes the reason for an awaiting maintenance condition</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attribute name="description" type="xs:string" use="required">
						<xs:annotation>
							<xs:documentation>Description of reason(s) for the unit to be in awaiting maintenance condition</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attribute name="awaitingMaintTimeStamp" type="xs:dateTime" use="required">
						<xs:annotation>
							<xs:documentation>Date/time when the unit was put on awaiting maintenance condition</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attribute name="delayTime" type="xs:duration" use="required">
						<xs:annotation>
							<xs:documentation>Intended to capture actual duration of the entire awaiting maintenance event</xs:documentation>
						</xs:annotation>
					</xs:attribute>
				</xs:complexType>
			</xs:element>
			<xs:element name="TechnicalManual" type="c:NonBlankString" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Lists relevant technical manuals that support maintenance of the UUT</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ReferenceInstanceDocument" type="c:DocumentReference" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>This references instances of the standards documents relevant to the maintenance of the UUT.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Description" type="c:NonBlankString">
				<xs:annotation>
					<xs:documentation>Provides a textual description of the response taken</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Warranty" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Manufacturer support program.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:attributeGroup ref="Warranty"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="maintenanceEventCode" type="c:NonBlankString" use="optional">
			<xs:annotation>
				<xs:documentation>To contain a coded identifier for a maintenance event. Defined per use case.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="maintenanceEventDescription" type="c:NonBlankString" use="required">
			<xs:annotation>
				<xs:documentation>Description of maintenance action.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attributeGroup ref="MaintenanceFacility"/>
		<xs:attribute name="actionCode" type="c:NonBlankString" use="optional">
			<xs:annotation>
				<xs:documentation>Code that best describes the action taken to perform the required maintenance</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="actionDescription" type="c:NonBlankString" use="required">
			<xs:annotation>
				<xs:documentation>Enter detailed description of action taken to perform the required maintenance</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="actionIdentifier" type="c:NonBlankString" use="optional">
			<xs:annotation>
				<xs:documentation>Identifier related to the action taken </xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Person">
		<xs:annotation>
			<xs:documentation>Used to capture information about the person performing the maintenance action on the item. </xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="Contact">
				<xs:attribute name="UniqueID" type="c:NonBlankString" use="required">
					<xs:annotation>
						<xs:documentation>Provides a unique identifier for the person performing the maintenance action</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="category" use="required">
					<xs:annotation>
						<xs:documentation>Each personnel element must be designated as belonging to one of the enumerated categories.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="authorizer"/>
							<xs:enumeration value="inspector"/>
							<xs:enumeration value="performer"/>
							<xs:enumeration value="supervisor"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:attribute>
				<xs:attribute name="skillLevel" use="required">
					<xs:annotation>
						<xs:documentation>Within each use case, each of the defined skill levels will have unique associated semantics. In general, lower numbers indicate less skill.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:int">
							<xs:minInclusive value="1"/>
							<xs:maxInclusive value="5"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:attribute>
				<xs:attribute name="toolBoxUsed" type="c:NonBlankString">
					<xs:annotation>
						<xs:documentation>Identification code of toolbox used to perform the work on the unit</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="maintenancePersonnelTime" type="xs:duration">
					<xs:annotation>
						<xs:documentation>Intended to capture actual duration of the time spent by the person performing the maintenance action.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:attributeGroup name="MaintenanceFacility">
		<xs:attribute name="facilityIdentifier" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Address of the maintenance facility</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="facilityName" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>Name of the facility performing the maintenance on the unit</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="facilityCapability" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Description of the maintenance facility's ability to perform the maintenance action</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:attributeGroup name="Warranty">
		<xs:attribute name="warrantyEffectiveDate" type="xs:date" use="required">
			<xs:annotation>
				<xs:documentation>Date when the manufacturer warranty begins to take effect</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="warrantyDuration" type="xs:duration" use="required">
			<xs:annotation>
				<xs:documentation>Time the unit is covered by the warranty, e.g. one-year warranty, two-year warranty, etc.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="warrantyExclusion" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Discrepancy in the unit that is not covered by the warranty</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="warrantedBy" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Name of the manufacturer which warrants the unit</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>
</xs:schema>

