<?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-21GB: Amend value list of attribute change by "modify" *
    *                   within group "INSDEL".                           *
    * 2. Bug fix:       Correct the pattern definitions on attributes    *
    *                   issno and inwork of element issno.               *
    * 3. Bug fix:       Correct the pattern definitions for year, month  *
    *                   and day.                                         *
    * 4. TPSMG request: Groups "SPAR" and "SPARCON" moved from file      *
    *                   pmlistcode.xsd to here.                          *
    *====================================================================*
    * The following include statement may be used to call this set of    *
    * declarations:-                                                     *
    *                                                                    *
    * <xs:include schemaLocation="dmaddr2.xsd"/>                         *
    ********************************************************************** -->


	<xs:attributeGroup name="COMMSEC">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Attribute Group "COMMSEC" (Commercial Security) containing:-*
    *  Attribute Definition List.                                        *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *                                                                    *
    *  commcls    - Declared - IMPLIED - Identifies Commercial Security. *
    *  caveat     - Declared - IMPLIED - Identifies Caveats.             *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="commcls" type="COMMCLSS"/>
		<xs:attribute name="caveat" type="CAVEATS"/>
	</xs:attributeGroup>
	
	<xs:attributeGroup name="SECURIT">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Attribute Group "SECURIT" (Status Security) containing:-    *
    *  Attribute Definition List.                                        *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *                                                                    *
    *  class    - Declared - REQUIRED - Identifies Security Marking.     *
    *  Definition stored in attribute group "COMMSEC".                   *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="class" type="CLASSES" use="required"/>
		<xs:attributeGroup ref="COMMSEC"/>
	</xs:attributeGroup>
	
	<xs:simpleType name="RPCNAME">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Simple Type "RPCNAME" (Responsible Partner Company Names)   *
    * containing:-                                                       *
    *====================================================================*
    *  RPC names allowed by the project.                                 *
    **********************************************************************-->
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	
	
	<xs:simpleType name="MONTH">
		<xs:restriction base="xs:positiveInteger">
			 <xs:maxInclusive value="12"/>
			 <xs:pattern value="\d{2}"/>
		</xs:restriction>
	</xs:simpleType>
<!-- Pattern definition corrected -->

	<xs:simpleType name="DAY">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="31"/>
			<xs:pattern value="\d{2}"/>
		</xs:restriction>
	</xs:simpleType>
<!-- Pattern definition corrected -->
	
	<xs:attributeGroup name="DATE">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Attribute Group "DATE" (Date breakdown) containing:-        *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  year     - NUMBER - REQUIRED - The year. (YYYY)                   *
    *  month    - NUMBER - REQUIRED - The month of the year. (MM)        *
    *  day      - NUMBER - REQUIRED - The day of the month. (DD)         *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="year" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:gYear">
					<xs:pattern value="\d{4}"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="month" type="MONTH" use="required"/>
		<xs:attribute name="day" type="DAY" use="required"/>
	</xs:attributeGroup>
<!-- Pattern definition on attribute year corrected -->
	
	<xs:attributeGroup name="INSDEL">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Attribute Group "INSDEL" (Change Level Attributes)          *
    * containing:-                                                       *
    *  Attribute Definition List.                                        *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  level     - NUMBER   - IMPLIED  - Identifies the level or Data    *
    *                        issue (project specific) at which the       *
    *                        information was revised/updated             *
    *  mark      - NUMBER   - IMPLIED - Revision Bar. (This can be used  *
    *                        in conjunction which level to only produce  *
    *                        revision bar for the current level/issue of *
    *                        a data module.)                             *
    *                        - "0" Do not mark change with Revision bars *
    *                        - "1" Mark this change with Revision Bars   *
    *  change    - DECLARED - IMPLIED  - Identifies the type of change   *
    *              - "add"    - Information was added                    *
    *              - "delete" - Information was deleted                  *
    *              - "modify" - Information was modified                 *
    *  rfc       - CDATA    - IMPLIED  - Specifies the reason for change *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="level" type="xs:string"/>
		<xs:attribute name="mark" type="xs:string"/>
		<xs:attribute name="change">
			<xs:simpleType>
				<xs:restriction base="xs:NMTOKEN">
					<xs:enumeration value="add"/>
					<xs:enumeration value="delete"/>
					<xs:enumeration value="modify"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="rfc" type="xs:string"/>
	</xs:attributeGroup>
<!-- Attribute value list of change amended by "modify" -->
	
	<xs:attributeGroup name="bodyatt">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Attribute Group "bodyatt" (Body Attributes) containing:-    *
    *  Attribute Definition List.                                        *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  id        - ID       - IMPLIED  - An identifier of the element    *
    *                       which is assigned at origination and which   *
    *                       remains unchanged as the document is revised *
    *                       or updated even though the automatically     *
    *                       assigned enumeration "labels" change. The    *
    *                       value of "id" is used when making references *
    *                       to the element from other portions of the    *
    *                       document.                                    *
    *  Attribute Definition List stored in attribute group "INSDEL".     *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="id" type="xs:ID"/>
		<xs:attributeGroup ref="INSDEL"/>
	</xs:attributeGroup>
	
	
	<xs:simpleType name="NONNEGI2">
		<xs:restriction base="xs:nonNegativeInteger">
			<xs:pattern value="\d{2}"/>
		</xs:restriction>
	</xs:simpleType>

	<!-- call with mixed="true" -->
	<xs:group name="SPAR">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Group "SPAR" (Simple Paragraphs) containing:-               *
    *====================================================================*
    * Optional  Repeatable Group.                                        *
    *====================================================================*
    *   Parsed Character Data.                                           *
    *  or                                                                *
    *   p        - Mandatory Single     contains Definition stored in    *
    *                                   group "SPARCON".                 *
    *====================================================================*
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="p"/>
		</xs:sequence>
	</xs:group>

	<!-- call with mixed="true" -->
	<xs:group name="SPARCON">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Group "SPARCON" (Simple Paragraph Continuation)             *
    * containing:-                                                       *
    *====================================================================*
    * Optional Repeatable Group                                          *
    *====================================================================*
    *   Parsed Character Data.                                           *
    *  or                                                                *
    *   subscrpt - mandatory single  contains Replaceable Character Data.*
    *  or                                                                *
    *   supscrpt - mandatory single  contains Replaceable Character Data.*
    *====================================================================*
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element ref="subscrpt"/>
			<xs:element ref="supscrpt"/>
		</xs:choice>
	</xs:group>

	<xs:element name="issno">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element issno (Issue Number) containing:-                   *
    *  No Other Tags.                                                    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  issno  - NUMBER    - REQUIRED - Issue Number (XXX).               *
    *  inwork - NUMBER    - IMPLIED  - Sub-Issue Number (XX).            *
    *  type   - Declared  - "new"    - Status of this issue              *
    *         - "new"      - New object.                                 *
    *         - "changed"  - Changed. Changes marked by change markers.  *
    *         - "deleted"  - Deleted.                                    *
    *         - "revised"  - Completely Revised. Changes not marked by   *
    *                        change markers.                             *
    *         - "status"   - Only Status information changed.            *
    *         - "rinstate-changed" - Reinstated and content changed.     *
    *         - "rinstate-revised" - Reinstated and content completely   *
    *                                revised.                            *
    *         - "rinstate-status"  - Reinstated and status only changed. *
    **********************************************************************
		</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="issno" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:nonNegativeInteger">
						<xs:pattern value="\d{3}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="inwork" type="NONNEGI2"/>
			<xs:attribute name="type" default="new">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="new"/>
						<xs:enumeration value="changed"/>
						<xs:enumeration value="deleted"/>
						<xs:enumeration value="revised"/>
						<xs:enumeration value="status"/>
						<xs:enumeration value="rinstate-changed"/>
						<xs:enumeration value="rinstate-revised"/>
						<xs:enumeration value="rinstate-status"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="issdate">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element issdate (Issue Date) containing:-                   *
    *  No Other Tags.                                                    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  Attribute Definition List stored in attribute group "DATE".       *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attributeGroup ref="DATE"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="security">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element security (Security Marking) containing:-            *
    *  No Other Tags.                                                    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *  Attribute Definition List stored in attribute group "SECURIT".    *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attributeGroup ref="SECURIT"/>
		</xs:complexType>
	</xs:element>
	
</xs:schema>
