<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	   xmlns:xlink="http://www.w3.org/1999/xlink"
           elementFormDefault="qualified"
           attributeFormDefault="qualified">

<!--**********************************************************************
    *                                                                    *
    *                        S1000D Issue 2                              *
    *                          XML Schema                                *
    *                                                                    *
    *                     Release Version 2.2                            *
    *                       Date: 2005-05-01                             *
    *                                                                    *
    * Amendment:-                                                        *
    * 1. CPF 2004-24GB: Replace element <level> by new element           *
    *                   <maintlevel> allowing the definition of generic  *
    *                   maintenance levels.                              *
    * 2. CPF 2004-32US: Expand Process DM to include <step1> content:    *
    *                   Create an APPLIC content group that can be       *
    *                   customized for static and interactive use.       *
    * 3. Consistency:   Redefine the type of all elements which contain  *
    *                   only Parsed Character Data and have no           *
    *                   attributes to be of type="xs:string".            *
    *                                                                    *
    * The following include statement may be used to call this set of    *
    * declarations:-                                                     *
    *                                                                    *
    * <xs:include schemaLocation="applic.xsd"/>                          *
    ********************************************************************** -->


<!--**********************************************************************
    * Import the XLINK definitions.                                      *
    ********************************************************************** -->
	<xs:import 	namespace="http://www.w3.org/1999/xlink" 
			schemaLocation="xlink.xsd"/>


	<xs:element name="applic">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element applic (Applicability) containing:-                 *
    *  Definition stored in group APPLIC.                                *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:group ref="APPLIC"/>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>
<!-- Content model changed -->
	
	<xs:element name="type" type="xs:string">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element type (Type) containing:-                            *
    *  Parsed Character Data.                                            *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
	</xs:element>
<!-- Type of element changed -->
	
	<xs:element name="model">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element model (Model) containing:-                          *
    *====================================================================*
    *  Optional Repeatable Group.                                        *
    *====================================================================*
    *    csnref   - Mandatory  Single    contains No Other Tags.         *
    *   or                                                               *
    *    nsn      - Mandatory  Single    contains No Other Tags.         *
    *   or                                                               *
    *====================================================================*
    *    Mandatory Single Group.                                         *
    *====================================================================*
    *      mfc      - Optional   Single    contains PCDATA.              *
    *====================================================================*
    *      Optional Repeatable Group.                                    *
    *====================================================================*
    *        pnr      - Optional Single     contains PCDATA.             *
    *        serialno - Optional Repeatable contains single, range.      *
    *====================================================================*
    *====================================================================*
    *====================================================================*
    *  batchno    - Optional   Single      contains single, range.       *
    *  moduleno   - Optional   Repeatable  contains PCDATA.              *
    *  customer   - Optional   Repeatable  contains PCDATA.              *
    *  softprog   - Optional   Repeatable  contains PCDATA.              *
    *  maintlevel - Optional   Single      contains mntlvl.              *
    *  config     - Optional   Single      contains mod, sb.             *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  model    - CDATA    - REQUIRED - Model.                           *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="version" minOccurs="0" maxOccurs="unbounded"/>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="csnref"/>
					<xs:element ref="nsn"/>
					<xs:sequence>
						<xs:element ref="mfc"/>
						<xs:sequence minOccurs="0" maxOccurs="unbounded">
							<xs:element ref="pnr"/>
							<xs:element ref="serialno" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:sequence>
				</xs:choice>
				<xs:element ref="batchno" minOccurs="0"/>
				<xs:element ref="moduleno" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="customer" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="softprog" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="maintlevel" minOccurs="0"/>
				<xs:element ref="config" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="model" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
<!-- Element <level> replaced by <maintlevel> in the content model -->

	<xs:element name="version">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element version (Version) containing:-                      *
    *  versrank - Optional   Repeatable  contains single, range          *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  version  - CDATA    - REQUIRED - Version.                         *
    *  id       - ID       - IMPLIED  - Unique identifier of version.    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>	
				<xs:element ref="versrank" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="version" type="xs:string" use="required"/>
			<xs:attribute name="id" type="xs:ID"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="versrank">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element versrank (Version Rank) containing:-                *
    *====================================================================*
    * Mandatory Repeatable Group                                         *
    *====================================================================*
    *  single   - Optional   Single      contains Parsed Character Data. *
    * or                                                                 *
    *  range    - Optional   Single      contains No Other Tags.         *
    *====================================================================*
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  id       - ID       - IMPLIED  - Unique identifier of version rank*
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">
				<xs:element ref="single"/>
				<xs:element ref="range"/>
			</xs:choice>
			<xs:attribute name="id" type="xs:ID"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="csnref">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element csnref (Reference to CSN) containing:-              *
    *  No Other Tags.                                                    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  refcsn   - CDATA  - REQUIRED - CSN code                           *
    *  refisn   - CDATA  - IMPLIED  - ISN code                           *
    *  refipp   - CDATA  - IMPLIED  - IPP number (four digits)           *
    *  refrpc   - CDATA  - IMPLIED  - RPC code(one char,project-specific)*
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    *  Attribute Definition List stored in attribute group "XLINKATT2".  *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="refcsn" type="xs:string" use="required"/>
			<xs:attribute name="refisn" type="xs:string"/>
			<xs:attribute name="refipp" type="xs:string"/>
			<xs:attribute name="refrpc" type="xs:string"/>
			<xs:attributeGroup ref="bodyatt"/>
			<xs:attributeGroup ref="xlink:XLINKATT2"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="batchno">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element batchno (Batch Number) containing:-                 *
    *====================================================================*
    * Mandatory Repeatable Group                                         *
    *====================================================================*
    *  single   - Optional   Single      contains Parsed Character Data. *
    * or                                                                 *
    *  range    - Optional   Single      contains No Other Tags.         *
    *====================================================================*
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">	
				<xs:element ref="single"/>
				<xs:element ref="range"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>

	<xs:element name="single" type="xs:string">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element single (Single Number) containing:-                 *
    *  Parsed Character Data.                                            *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
	</xs:element>
<!-- Type of element changed -->

	<xs:element name="range">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element range (Range of Numbers) containing:-               *
    *   No Other Tags.                                                   *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  from     - CDATA    - REQUIRED - Start of Range.                  *
    *  to       - CDATA    - REQUIRED - End of Range.                    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>	
			<xs:attribute name="from" type="xs:string" use="required"/>
			<xs:attribute name="to" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="moduleno" type="xs:string">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element moduleno (Engine Module Number) containing:-        *
    *  Parsed Character Data.                                            *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
	</xs:element>
<!-- Type of element changed -->

	<xs:element name="serialno">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element serialno (Serial Number) containing:-               *
    *====================================================================*
    * Mandatory Repeatable Group                                         *
    *====================================================================*
    *  single   - Optional   Single      contains Parsed Character Data. *
    * or                                                                 *
    *  range    - Optional   Single      contains No Other Tags.         *
    *====================================================================*
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">	
				<xs:element ref="single"/>
				<xs:element ref="range"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>

	<xs:element name="pnr">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element pnr (Manufacturer Part Number) containing:-         *
    *  Parsed Character Data.                                            *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>			
			<xs:simpleContent>
				<xs:extension base="xs:string">
					<xs:attributeGroup ref="bodyatt"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>	 
	</xs:element>

	<xs:element name="customer" type="xs:string">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element customer (Customer) containing:-                    *
    *  Parsed Character Data.                                            *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
	</xs:element>
<!-- Type of element changed -->

	<xs:element name="softprog" type="xs:string">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element softprog (Software Program Edition) containing:-    *
    *  Parsed Character Data.                                            *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
	</xs:element>
<!-- Type of element changed -->

	<xs:element name="maintlevel">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element maintlevel (Maintenance levels) containing:-        *
    *  mntlvl     - Mandatory Repeatable    contains No Other Tags.      *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="mntlvl" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
<!-- Element <level> replaced by element <maintlevel> -->

	<xs:element name="mntlvl">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element mntlvl (Maintenance level) containing:-             *
    *  No Other Tags.                                                    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  mntlvl     - "MNTLVLS"  - REQUIRED   - Generic maintenance level. *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute ref="mntlvl" use="required"/>
		</xs:complexType>
	</xs:element>
<!-- Newly introduced element -->

	<xs:element name="config">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element config (Configuration) containing:-                 *
    *  mod       - Optional  Repeatable  contains modtitle.              *
    *  sb        - Optional  Repeatable  contains definition stored in   *
    *                                    group "ALLDMC", issno, dmtitle, *
    *                                    definition stored in group      *
    *                                    "PUBREF".                       *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="mod" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="sb" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="sb">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element sb (Service Bulletin) containing:-                  *
    *====================================================================*
    * Mandatory Single Group.                                            *
    *====================================================================*
    *  Definition stored in group "ALLDMC".                              *
    *  issno     - Optional   Single     contains No Other Tags.         *
    *  dmtitle   - Optional   Single     contains Parsed Character Data. *
    *====================================================================*
    * or                                                                 *
    *====================================================================*
    * Mandatory Single Group.                                            *
    *====================================================================*
    *  Definition stored in group "PUBREF".                              *
    *====================================================================*
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  sbcond   - Declared   - REQUIRED - Service bulletin condition.    *
    *           - "pre"      - Premod condition.                         *
    *           - "post"     - Postmod condition.                        *
    *           - "prandpo"  - Both pre and postmod.                     *
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice>
				<xs:sequence>
					<xs:group ref="ALLDMC"/>
					<xs:element ref="issno" minOccurs="0"/>
					<xs:element ref="dmtitle" minOccurs="0"/>				
				</xs:sequence>
				<xs:group ref="PUBREF"/>
			</xs:choice>
			<xs:attribute name="sbcond" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="pre"/>
						<xs:enumeration value="post"/>
						<xs:enumeration value="prandpo"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="mfc">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element mfc (Manufacturer) containing:-                     *
    *  Parsed Character Data.                                            *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>	
		<xs:complexType mixed="true">
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="nsn">
		<xs:annotation>
			<xs:documentation>
    ********************************************************************** 
    * Define Element nsn (NATO Stock Number) containing:-                *
    *  No Other Tags.                                                    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  nsn     - CDATA    - IMPLIED - NATO Stock Number (one text string)*
    *  nsc     - NUMBER   - IMPLIED - NATO Supply Class (XXXX).          *
    *  ncb     - NUMBER   - IMPLIED - NATO Codification Bureau (XX)      *
    *                                 (= NIN positions 1 and 2).         *
    *  nin3to9 - NUMBER   - IMPLIED - NATO Item Identification Number    *
    *                                 (NIN) positions 3 to 9 (XXXXXXX).  *
    *  Attribute Definition List stored in attribute group "bodyatt".    *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>	
			<xs:attribute name="nsn" type="xs:string"/>
			<xs:attribute name="nsc" type="xs:int"/>
			<xs:attribute name="ncb" type="xs:int"/>
			<xs:attribute name="nin3to9" type="xs:int"/>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>


</xs:schema>
