<?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.1                          *
    *                       Date: 2006-05-01                             *
    *                                                                    *
    * Amendment:-                                                        *
    * 1. Consistency:   Element <notname> have to be defined as mixed in *
    *                   order to specify the notation name inside.       *
    *                                                                    *
    * The following include statement may be used to call this set of    *
    * declarations:-                                                     *
    *                                                                    *
    * <xs:include schemaLocation="brex.xsd"/>                            *
    ********************************************************************** -->
    
	<xs:group name="CONTENT">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Group "CONTENT" (Content Breakdown) containing:-  brex.     *
    **********************************************************************
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="brex"/>
		</xs:sequence>
	</xs:group>
	
	<xs:element name="brex">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element brex (Business Rules Exchange) containing:-         *
    **********************************************************************
    * The Business Rules exchange element contains all the rules that    *
    * apply regarding structural markup.                                 *
    **********************************************************************
    *   contextrules - Mandatory Repeatable Structural Related Rules     *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    **********************************************************************
 			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="contextrules" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="contextrules">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element contextrules (Context for Rules) containing:-       *
    **********************************************************************
    * The Context Rules element contains all the rules that apply to a   *
    * specified context (DTD/Schema). Context may also be general.       *
    **********************************************************************
    *   structrules   - Optional  Single      Structural Related Rules   *
    *   notationrules - Optional  Single      Notation Rules             *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   context  - CDATA    - IMPLIED      - Applicable rules context    *
    *                                        given as SGML Public Ident  *
    *                           not given  - Rules apply to all DTDs     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    ********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="structrules" minOccurs="0"/>
				<xs:element ref="notationrules" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="context" type="xs:string"/>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="structrules">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element structrules (Structure Rules) containing:-          *
    **********************************************************************
    * The Structure Rules element contains all the rules that apply      *
    * regarding structural markup.                                       *
    **********************************************************************
    *   objrule  - Mandatory Repeatable  Rules for a structure object    *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    ********************************************************************** 
  			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="objrule" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="notationrules">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element notationrules (Notation Rules) containing:-         *
    **********************************************************************
    * The Notation Rules element contains all the rules that apply       *
    * regarding use of NOTATIONs within a project.                       *
    * Note that a project should not extend the set of notations given   *
    * by the specification!                                              *
    **********************************************************************
    *   notrule  - Mandatory Repeatable       Rules for a notation       *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    **********************************************************************
  			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="notrule" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="objrule">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element objrule (Rules for a Structure Object) containing:- *
    **********************************************************************
    * The Structure Object Rule element contains all the rules that      *
    * apply to a specific markup entity, such as an element or attribute.*
    **********************************************************************
    *   objpath     - Mandatory Single      Object's identification      *
    *   objuse      - Optional  Single      Object's intended usage      *
    *   objval      - Optional  Repeatable  Object value specification   *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    **********************************************************************
  			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="objpath"/>
				<xs:element ref="objuse" minOccurs="0"/>
				<xs:element ref="objval" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="notrule">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element notrule (Rules for a Notation) containing:-         *
    **********************************************************************
    * The Notation Rule element specifies if a notation must or mustn't  *
    * be used within a project. Optionally, it can describe for what     *
    * purpose a notation shall be used within a project.                 *
    **********************************************************************
    *   notname     - Mandatory Single      Name of notation concerned   *
    *   objuse      - Optional  Single      Description of how its used  *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    ********************************************************************** 
  			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="notname"/>
				<xs:element ref="objuse" minOccurs="0"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="objpath">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element objpath (Structural Object Path) containing:-       *
    **********************************************************************
    * The Structural Object Path element specifies the location of the   *
    * markup entity concerned by the rules specified in elements         *
    * objuse and objvals.                                                *
    * The location should be specified in terms of an Xpath expression   *
    * specifying the element or attribute name concerned.                *
    **********************************************************************
    *  Parsed Character Data.                                            *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   objappl  - NUMBER  - IMPLIED   - specifying which objects to be  *
    *                                    used or not                     *
    *              - "1"     - Yes       - mandatory                     *
    *              - "0"     - No        - not to be used                *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    ********************************************************************** 
  			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:string">
					<xs:attribute name="objappl" type="yesorno"/>
					<xs:attributeGroup ref="bodyatt"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="objuse">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element objuse (Object Use Description) containing:-        *
    **********************************************************************
    * The Markup Use descr. element contains the verbal specification    *
    * of for what purpose the corresponding markup entity is used.       *
    * This spcification is particularly useful when a project applies a  *
    * specific use of the entity, ie restricted with respect to the spec.*
    **********************************************************************
    *   Definition stored in group "SPARCON".                            *
    *   refs      - Optional  Single      contains refdm, reftp.         *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    ********************************************************************** 
  			</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:group ref="SPARCON" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="refs" minOccurs="0"/>
			</xs:sequence>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="objval">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element objval (Object Value) containing:-                  *
    **********************************************************************
    * The objval element contains a single value or a range of values    *
    * which are valid for the markup entity concerned (objpath).         *
    *====================================================================*
    *   Definition stored in group "SPARCON".                            *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   valtype  - Declared - IMPLIED   - Value type:                    *
    *              - "single"             - Single value                 *
    *              - "range"              - Range from val1 to val2      *
    *   val1     - CDATA    - IMPLIED   - if "single", the value;        *
    *                                     if "range" incl from           *
    *   val2     - CDATA    - IMPLIED   - if "range", incl to            *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    ********************************************************************** 
    			</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:group ref="SPARCON" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="valtype">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="single"/>
						<xs:enumeration value="range"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="val1" type="xs:string"/>
			<xs:attribute name="val2" type="xs:string"/>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="notname">
		<xs:annotation>
			<xs:documentation>
    **********************************************************************
    * Define Element notname (Notation Name) containing:-                *
    **********************************************************************
    * The Notation Name element specifies a NOTATION that is             *
    * subject of certain business rules (eg GIF might be prohibited)     *
    **********************************************************************
    *  Parsed Character Data.                                            *
    *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
    * Attribute(s):-                                                     *
    *   notappl  - NUMBER  - IMPLIED   - specifying if the notation is   *
    *                                    applied, where                  *
    *              - "1"     - Yes       - Notation is allowed within    *
    *                                      the project                   *
    *              - "0"     - No        - Notation is not allowed for   *
    *                                      some reason                   *
    *   Attribute Definition List stored in attribute group "bodyatt".   *
    **********************************************************************
    			</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute name="notappl" type="yesorno"/>
			<xs:attributeGroup ref="bodyatt"/>
		</xs:complexType>
	</xs:element>

</xs:schema>