<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.00">
  <!--=========================================-->
  <!--===== IE907:C_EDI_NCK  -->
  <!--===== EDIFACT NACK  -->
  <!--===== NCTS Domain Definition  -->
  <!--===== DDNTA v14.00  -->
  <!--===== Included Features: [12, 17, 20, 21, 23, 24, 27, 29]  -->
  <!--=========================================-->
  <!--===== Includes =====-->
  <xs:include schemaLocation="simple_types_ncts.xsd" />
  <xs:include schemaLocation="simple_types.xsd" />
  <xs:include schemaLocation="complex_types.xsd" />
  <xs:include schemaLocation="tcl_ncts.xsd" />
  <xs:include schemaLocation="tcl.xsd" />
  <xs:include schemaLocation="doc.xsd" />
  <!--===== Root Element =====-->
  <xs:element name="CD907A" type="CD907A" />
  <!--===== Root Element Content =====-->
  <xs:complexType name="CD907A">
    <xs:sequence>
      <xs:group ref="MESSAGE" />
      <xs:element name="INTERRORS" type="INTERRORS">
        <xs:annotation>
          <xs:documentation>
            <description value="INTERCHANGE ERRORS" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MSGERRS" type="MSGERRS" minOccurs="0" maxOccurs="99">
        <xs:annotation>
          <xs:documentation>
            <description value="MESSAGE ERRORS" />
            <rule name="TR0902" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== MESSAGE Content =====-->
  <xs:group name="MESSAGE">
    <xs:sequence>
      <xs:element name="SynIdeMES1" type="SyntaxIdentifier">
        <xs:annotation>
          <xs:documentation>
            <description value="Syntax identifier" />
            <codeList name="SyntaxIdentifier" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SynVerNumMES2" type="SyntaxVersionNumber">
        <xs:annotation>
          <xs:documentation>
            <description value="Syntax version number" />
            <codeList name="SyntaxVersionNumber" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesSenMES3" type="Alphanumeric_Max35">
        <xs:annotation>
          <xs:documentation>
            <description value="Message sender" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SenIdeCodQuaMES4" type="Alphanumeric_Max4" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Sender identification code qualifier" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesRecMES6" type="Alphanumeric_Max35">
        <xs:annotation>
          <xs:documentation>
            <description value="Message recipient" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecIdeCodQuaMES7" type="Alphanumeric_Max4" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Recipient identification code qualifier" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DatOfPreMES9" type="Numeric_6">
        <xs:annotation>
          <xs:documentation>
            <description value="Date of preparation" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimOfPreMES10" type="Numeric_4">
        <xs:annotation>
          <xs:documentation>
            <description value="Time of preparation" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IntConRefMES11" type="Alphanumeric_Max14">
        <xs:annotation>
          <xs:documentation>
            <description value="Interchange control reference" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecRefMES12" type="Alphanumeric_Max14" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Recipient's reference/password" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecRefQuaMES13" type="Alphanumeric_2" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Recipient's reference/password qualifier" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AppRefMES14" type="Alphanumeric_Max14" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Application reference" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PriMES15" type="Alpha_1" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Priority" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AckReqMES16" type="Flag" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Acknowledgement request" />
            <codeList name="Flag" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ComAgrIdMES17" type="Alphanumeric_Max35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Communications agreement id" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TesIndMES18" type="Flag" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Test indicator" />
            <rule name="TR9085" />
            <codeList name="Flag" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesIdeMES19" type="Alphanumeric_Max14">
        <xs:annotation>
          <xs:documentation>
            <description value="Message identification" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesTypMES20" type="MessageTypes">
        <xs:annotation>
          <xs:documentation>
            <description value="Message type" />
            <codeList name="MessageTypes" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ComAccRefMES21" type="Alphanumeric_Max35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Common access reference" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <!--===== MESSAGE ERRORS =====-->
  <xs:complexType name="MSGERRS">
    <xs:annotation>
      <xs:documentation>
        <description value="MESSAGE ERRORS" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MesIdeMER1" type="Alphanumeric_Max14">
        <xs:annotation>
          <xs:documentation>
            <description value="Message identification" />
            <rule name="TR9250" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesTypMER2" type="NctsUnEdifactMessageTypes">
        <xs:annotation>
          <xs:documentation>
            <description value="Message type" />
            <codeList name="NctsUnEdifactMessageTypes" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesVerMER3" type="VersionNumbers">
        <xs:annotation>
          <xs:documentation>
            <description value="Message version" />
            <codeList name="VersionNumbers" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesRelNoMER4" type="ReleaseNumbers">
        <xs:annotation>
          <xs:documentation>
            <description value="Message release number" />
            <codeList name="ReleaseNumbers" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesContAgMER5" type="ControllingAgencies">
        <xs:annotation>
          <xs:documentation>
            <description value="Controlling agency" />
            <codeList name="ControllingAgencies" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AssCodMER6" type="Alphanumeric_Max6">
        <xs:annotation>
          <xs:documentation>
            <description value="Association assigned code" />
            <rule name="TR9250" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActRecMER7" type="ActionCodes">
        <xs:annotation>
          <xs:documentation>
            <description value="Action taken by recipient" />
            <codeList name="ActionCodes" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ErrTypMER8" type="ErrorCodesForEdiNck" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Error" />
            <rule name="TR0901" />
            <codeList name="ErrorCodesForEdiNck" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesSegMER9" type="MessageServiceSegmentTags" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Message service segment" />
            <rule name="TR0903" />
            <codeList name="MessageServiceSegmentTags" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PosElmntMER10" type="Numeric_Max3" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Position of erroneous data element" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PosCompMER11" type="Numeric_Max3" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Position of erroneous data component" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MSGERRSEGERR" type="MSGERRSEGERR" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            <description value="SEGMENT ERRORS" />
            <rule name="TR0902" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== SEGMENT ERRORS =====-->
  <xs:complexType name="MSGERRSEGERR">
    <xs:annotation>
      <xs:documentation>
        <description value="SEGMENT ERRORS" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SegPosSER1" type="Numeric_Max6">
        <xs:annotation>
          <xs:documentation>
            <description value="Segment position in message" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ErrTypSER2" type="ErrorCodesForEdiNck" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Error" />
            <rule name="TR0901" />
            <codeList name="ErrorCodesForEdiNck" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MSGERRSEGDATERR" type="MSGERRSEGDATERR" minOccurs="0" maxOccurs="99">
        <xs:annotation>
          <xs:documentation>
            <description value="DATA ELEMENT ERRORS" />
            <rule name="TR0902" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>

