<?xml version="1.0"?>
<xs:schema 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
           	elementFormDefault="qualified"
           	attributeFormDefault="qualified">

<!--**********************************************************************
    *                                                                    *
    *                        S1000D Issue 2                              *
    *                          XML Schema                                *
    *                                                                    *
    *                     Release Version 2.2                            *
    *                       Date: 2005-05-01                             *
    *                                                                    *
    * Amendment:-                                                        *
    * 1. CPF 2004-06SE: Replace element <reqdm> by <refdm>.              *
    *                                                                    *
    * The following include statement may be used to call this set of    *
    * declarations:-                                                     *
    *                                                                    *
    * <xs:include schemaLocation="dmc.xsd"/>                             *
    ********************************************************************** -->

	<xs:group name="ALLDMC">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Group "ALLDMC" (All Data Module Codes)  containing:-        *
    **********************************************************************
    * The group "ALLDMC" is used to allow refdm to access                *
    * Data Modules Codes of different types (AGE or AVEE).               *
    **********************************************************************
    *   age      - Mandatory Single     contains modelic, supeqvc,       *
    *                                   ecscs, eidc, cidc,               *
    *                                   discode , discodev, incode,      *
    *                                   incodev, itemloc.                *
    *  or                                                                *
    *   avee     - Mandatory Single     contains modelic, sdc, chapnum,  *
    *                                   section, subsect, discode,       *
    *                                   discodev, incode, incodev,       *
    *                                   itemloc.                         *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element ref="age"/>
			<xs:element ref="avee"/>
		</xs:choice>
	</xs:group>

	<xs:element name="dmc">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element dmc (Data Module Code) containing:-                 *
    *  Definition stored in group "ALLDMC".                              *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:group ref="ALLDMC"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="age">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element age (All Ground Equipment) containing:-             *
    *====================================================================*
    * This defines the structure of the Data Module Code for All         *
    * Ground Equipment data modules.                                     *
    *====================================================================*
    *   modelic  - Mandatory Single     contains Parsed Character Data.  *
    *   supeqvc  - Mandatory Single     contains Parsed Character Data.  *
    *   ecscs    - Mandatory Single     contains Parsed Character Data.  *
    *   eidc     - Mandatory Single     contains Parsed Character Data.  *
    *   cidc     - Mandatory Single     contains Parsed Character Data.  *
    *   discode  - Mandatory Single     contains Parsed Character Data.  *
    *   discodev - Mandatory Single     contains Parsed Character Data.  *
    *   incode   - Mandatory Single     contains Parsed Character Data.  *
    *   incodev  - Mandatory Single     contains Parsed Character Data.  *
    *   itemloc  - Mandatory Single     contains Parsed Character Data.  *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="modelic"/>
				<xs:element ref="supeqvc"/>
				<xs:element ref="ecscs"/>
				<xs:element ref="eidc"/>
				<xs:element ref="cidc"/>
				<xs:element ref="discode"/>
				<xs:element ref="discodev"/>
				<xs:element ref="incode"/>
				<xs:element ref="incodev"/>
				<xs:element ref="itemloc"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="avee">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element avee (All Vehicle, Engines, Equipment)              *
    *  containing:-                                                      *
    *====================================================================*
    * This defines the structure of the Data Module Code for All Vehicle,*
    * Engines, Equipment data modules.                                   *
    *====================================================================*
    *   modelic  - Mandatory Single     contains Parsed Character Data.  *
    *   sdc      - Mandatory Single     contains Parsed Character Data.  *
    *   chapnum  - Mandatory Single     contains Parsed Character Data.  *
    *   section  - Mandatory Single     contains Parsed Character Data.  *
    *   subsect  - Mandatory Single     contains Parsed Character Data.  *
    *   subject  - Mandatory Single     contains Parsed Character Data.  *
    *   discode  - Mandatory Single     contains Parsed Character Data.  *
    *   discodev - Mandatory Single     contains Parsed Character Data.  *
    *   incode   - Mandatory Single     contains Parsed Character Data.  *
    *   incodev  - Mandatory Single     contains Parsed Character Data.  *
    *   itemloc  - Mandatory Single     contains Parsed Character Data.  *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="modelic"/>
				<xs:element ref="sdc"/>
				<xs:element ref="chapnum"/>
				<xs:element ref="section"/>
				<xs:element ref="subsect"/>
				<xs:element ref="subject"/>
				<xs:element ref="discode"/>
				<xs:element ref="discodev"/>
				<xs:element ref="incode"/>
				<xs:element ref="incodev"/>
				<xs:element ref="itemloc"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="modelic">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element modelic (Model Identification Code) containing:-    *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{2,14}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="supeqvc">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element supeqvc (Support Equipment Variant Code)            *
    * containing:-                                                       *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1,4}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="ecscs">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element ecscs (Equipment Category and Sub-Category Code)    *
    * containing:-                                                       *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{2,3}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="eidc">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element eidc (Equipment Identification Code) containing:-   *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{2}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="cidc">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element cidc (Component Identification Code) containing:-   *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="([A-Za-z0-9]{2}|[A-Za-z0-9]{4})"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="discode">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element discode (Disassembly Code) containing:-             *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{2}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="discodev">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element discodev (Disassembly Code Variant) containing:-    *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1,3}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="incode">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element incode (Information Code) containing:-              *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{3}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="incodev">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element incodev (Information Code Variant) containing:-     *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="itemloc">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element itemloc (Item Location Code) containing:-           *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="subject">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element subject (Subject Number or Unit/Assembly)           *
    * containing:-                                                       *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="([A-Za-z0-9]{2}|[A-Za-z0-9]{4})"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="sdc">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element sdc (System Difference Code) containing:-           *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1,4}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="chapnum">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element chapnum (Chapter Number or System) containing:-     *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{2,3}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="section">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element section (Section Number or Subsystem) containing:-  *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

	<xs:element name="subsect">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element subsect (Sub-Section Number or Sub-subsystem)       *
    * containing:-                                                       *
    *   Parsed Character Data.                                           *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="[A-Za-z0-9]{1}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>


</xs:schema>
