Schema cusres message-v2.1.xsd


schema location:  C:\FileServer\users\hugo\cusres message-v2.1.xsd
 
Elements  Simple types 
CusresMessage  decimal12 
decimal15 
decimal18 
decimal2 
decimal3 
decimal4 
decimal5 
decimal6 
decimal8 
integer1..n 
string0..1 
string0..10 
string0..17 
string0..18 
string0..25 
string0..26 
string0..3 
string0..35 
string0..4 
string0..6 
string0..7 
string0..70 
string0..8 
string0..9 
string1..10 
string1..14 
string1..17 
string1..18 
string1..2 
string1..25 
string1..3 
string1..35 
string1..512 
string1..6 
string1..70 
string1..8 
string1..9 


element CusresMessage
diagram
properties
content complex
children MessageHeader BeginningOfMessage DateTimePeriod FreeText GeneralIndicator NameAndAddress Reference DocumentDetails MessageTrailler
annotation
documentation 
The Customs Response Message (CUSRES) permits the transfer of data from a customs administration:
- to acknowledge the receipt of the message 
- to indicate if  the information received is correct 
- to inform the sender of the status of the customs declaration 
- to transmit additional information
- to respond to batched messages 
source
<xs:element name="CusresMessage">
  <xs:annotation>
    <xs:documentation>The Customs Response Message (CUSRES) permits the transfer of data from a customs administration:
- to acknowledge the receipt of the message 
- to indicate if  the information received is correct 
- to inform the sender of the status of the customs declaration 
- to transmit additional information
- to respond to batched messages </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="MessageHeader">
        <xs:annotation>
          <xs:documentation>Service element to uniquely identify the message</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MessageReferenceNumber" type="string1..14">
              <xs:annotation>
                <xs:documentation>Unique message reference assigned by the sender</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="MessageTypeIdentifier">
              <xs:annotation>
                <xs:documentation>Type of message assigned by its control agency</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..6">
                  <xs:enumeration value="CUSRES">
                    <xs:annotation>
                      <xs:documentation>Customs response message</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageTypeVersionNumber">
              <xs:annotation>
                <xs:documentation>Version number of the message</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="D">
                    <xs:annotation>
                      <xs:documentation>Draft Version/UN/EDIFACT Directory</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageTypeReleaseNumber">
              <xs:annotation>
                <xs:documentation>Release number within the current message type version number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="97A">
                    <xs:annotation>
                      <xs:documentation>Release 1997 - A</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ControlingAgency">
              <xs:annotation>
                <xs:documentation>Code identifying the agency controlling the specification, maintenance and publication of the message type</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..2">
                  <xs:enumeration value="UN">
                    <xs:annotation>
                      <xs:documentation>UN/ECE/TRADE/WP.4</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="AssociationAssignedCode" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..6"/>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="BeginningOfMessage">
        <xs:annotation>
          <xs:documentation>Element to indicate the type and the reference number of the message to which
the CUSRES is a response.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DocumentName">
              <xs:annotation>
                <xs:documentation>Document/Message identifier name, coded</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="962">
                    <xs:annotation>
                      <xs:documentation>Document response (Customs)</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DocumentNumber">
              <xs:annotation>
                <xs:documentation>Reference number assigned to the document/message by the issuer</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageFunction">
              <xs:annotation>
                <xs:documentation>Code indicating the function of the message</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="11">
                    <xs:annotation>
                      <xs:documentation>Response</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ResponseType">
              <xs:annotation>
                <xs:documentation>Code specifying the type of acknowledgment required or transmitted</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AP">
                    <xs:annotation>
                      <xs:documentation>Accepted</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="RE">
                    <xs:annotation>
                      <xs:documentation>Rejected</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Element to indicate the date/time of the document/message</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DateTimePeriodQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="137">
                    <xs:annotation>
                      <xs:documentation>Document/message date/time

Date/time when a document/message is issued. This may include auhentication</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="243">
                    <xs:annotation>
                      <xs:documentation>Transmission date/time of document</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:maxLength value="3"/>
                  <xs:enumeration value="203">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="303">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0" maxOccurs="2">
        <xs:annotation>
          <xs:documentation>An element to specify  supplementary processable information</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TextSubjectQualifier">
              <xs:annotation>
                <xs:documentation>Code specifying the subject of the free text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="CUS">
                    <xs:annotation>
                      <xs:documentation>Customs declaration information</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="FreeText" minOccurs="0">
              <xs:simpleType>
                <xs:restriction base="string1..70">
                  <xs:enumeration value="ACT">
                    <xs:annotation>
                      <xs:documentation>Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ANU">
                    <xs:annotation>
                      <xs:documentation>Annulled</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="FEC">
                    <xs:annotation>
                      <xs:documentation>Closed</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PAC">
                    <xs:annotation>
                      <xs:documentation>Pre-Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PRV">
                    <xs:annotation>
                      <xs:documentation>Provisional</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ULT">
                    <xs:annotation>
                      <xs:documentation>Ultimated</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GeneralIndicator" minOccurs="0">
        <xs:annotation>
          <xs:documentation>An element to identifying the various customs processing indicators.

For backward compatibility only. No useful information will be provided. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ProcessingIndicator">
              <xs:annotation>
                <xs:documentation>Identifies the value to be attributed to indicators required by the processing system</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="1">
                    <xs:annotation>
                      <xs:documentation>Message content accepted</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="2">
                    <xs:annotation>
                      <xs:documentation>Message content rejected with comment</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="NameAndAddress">
        <xs:annotation>
          <xs:documentation>An element to identify the name and/or address of the party related to all information
at the lower level of the message.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="PartyQualifier">
              <xs:annotation>
                <xs:documentation>Code giving a specific meaning to a party</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AE">
                    <xs:annotation>
                      <xs:documentation>Declarant's agent/representative</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CG">
                    <xs:annotation>
                      <xs:documentation>Carrier's agent</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CM">
                    <xs:annotation>
                      <xs:documentation>Customs</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MR">
                    <xs:annotation>
                      <xs:documentation>Message recipient</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MS">
                    <xs:annotation>
                      <xs:documentation>Document/message issuer/sender</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="PartyId">
              <xs:annotation>
                <xs:documentation>Code identifying a party involved in a transaction</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="CodeListQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification of a code list</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="113">
                    <xs:annotation>
                      <xs:documentation>Customs office</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="167">
                    <xs:annotation>
                      <xs:documentation>Tax party identification</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="CodeListResponsibleAgency" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code identifying the agency resopnsible for a code list</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:maxLength value="3"/>
                  <xs:enumeration value="155">
                    <xs:annotation>
                      <xs:documentation>PT, Portuguese Customs</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Reference" maxOccurs="3">
        <xs:annotation>
          <xs:documentation>Group of elements containing  references and constants that apply to the entire message</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReferenceQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a reference element or a reference number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="ABO">
                    <xs:annotation>
                      <xs:documentation>Originator's reference</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFM">
                    <xs:annotation>
                      <xs:documentation>Secondary customs reference</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ATZ">
                    <xs:annotation>
                      <xs:documentation>Ship's stay reference number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ReferenceNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification number.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Element to identifying a date related to the preceding Reference</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DateTimePeriodQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="171">
                          <xs:annotation>
                            <xs:documentation>Reference Date/Time</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriod" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..35"/>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="203">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="303">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DocumentDetails" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DocumentDetails">
              <xs:annotation>
                <xs:documentation>An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DocumentName" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Document/message identifier expressed in code</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="355">
                          <xs:annotation>
                            <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Document/message number</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Reference" minOccurs="0">
              <xs:annotation>
                <xs:documentation>An element identifying a particular reference, e.g. house of bill number, master bill
number.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ReferenceQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="AAM">
                          <xs:annotation>
                            <xs:documentation>Waybill number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AAS">
                          <xs:annotation>
                            <xs:documentation>Transport document number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="ABH">
                          <xs:annotation>
                            <xs:documentation>Sub-house bill of landing number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AEV">
                          <xs:annotation>
                            <xs:documentation>Shipping note number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AEW">
                          <xs:annotation>
                            <xs:documentation>Empty container bill number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AEX">
                          <xs:annotation>
                            <xs:documentation>Non-negotiable maritime transport</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AFA">
                          <xs:annotation>
                            <xs:documentation>Through bill of lading number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AFB">
                          <xs:annotation>
                            <xs:documentation>Cargo manifest number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AFM">
                          <xs:annotation>
                            <xs:documentation>Secondary Customs reference</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BM">
                          <xs:annotation>
                            <xs:documentation>Bill of landing number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BN">
                          <xs:annotation>
                            <xs:documentation>Booking reference number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="CT">
                          <xs:annotation>
                            <xs:documentation>Contract number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="DQ">
                          <xs:annotation>
                            <xs:documentation>Delivery note number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="GDN">
                          <xs:annotation>
                            <xs:documentation>General declaration number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="MB">
                          <xs:annotation>
                            <xs:documentation>Master bill of lading number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PK">
                          <xs:annotation>
                            <xs:documentation>Packing list number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="ReferenceNumber" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..35"/>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="FreeText">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="TextSubjectQualifier">
                    <xs:annotation>
                      <xs:documentation>Code specifying the subject of the free text</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="CUS">
                          <xs:annotation>
                            <xs:documentation>Customs declaration information</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="FreeText">
                    <xs:simpleType>
                      <xs:restriction base="string1..70">
                        <xs:enumeration value="ACT">
                          <xs:annotation>
                            <xs:documentation>Active</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="ANU">
                          <xs:annotation>
                            <xs:documentation>Annulled</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="DES">
                          <xs:annotation>
                            <xs:documentation>Expanded</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="FIN">
                          <xs:annotation>
                            <xs:documentation>Finalized</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PEN">
                          <xs:annotation>
                            <xs:documentation>Pending</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PRV">
                          <xs:annotation>
                            <xs:documentation>Provisional</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="DateTimePeriod" maxOccurs="2">
              <xs:annotation>
                <xs:documentation>A segment identifying necessary dates</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DateTimePeriodQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="150">
                          <xs:annotation>
                            <xs:documentation>Declaration/presentation date</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="154">
                          <xs:annotation>
                            <xs:documentation>Acceptance date of document</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriod" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..35"/>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:maxLength value="3"/>
                        <xs:enumeration value="203">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="303">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ErrorPointDetails" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>An element to identifyi the location of an application error.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="MessageSection" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="1">
                          <xs:annotation>
                            <xs:documentation>Heading section</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="2">
                          <xs:annotation>
                            <xs:documentation>Detail section of a message</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="7">
                          <xs:annotation>
                            <xs:documentation>Sub-line item</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SegmentTag" type="string1..3" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Tag of a segment</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>
                  <xs:element name="Reference" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>segment to provide the references related to the application error.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ReferenceQualifier">
                          <xs:annotation>
                            <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="string1..3">
                              <xs:enumeration value="IB">
                                <xs:annotation>
                                  <xs:documentation>In bond number</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="ApplicationErrorInformation" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>An element identifying the type of application errors within a message.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ApplicationErrorIdentification" type="string1..8"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="FreeText" minOccurs="0" maxOccurs="3">
                    <xs:annotation>
                      <xs:documentation>A segment to provide explanation and/or supplementary information related to the specified application error.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="TextSubjectQualifier">
                          <xs:annotation>
                            <xs:documentation>Code specifying the subject of the free text</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="string1..3">
                              <xs:enumeration value="AAO">
                                <xs:annotation>
                                  <xs:documentation>Error description (free text)</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CUS">
                                <xs:annotation>
                                  <xs:documentation>Customs declaration information</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="TextLiteral" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>Free text</xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="FreeText" maxOccurs="5">
                                <xs:annotation>
                                  <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="string1..70">
                                    <xs:enumeration value="ACT">
                                      <xs:annotation>
                                        <xs:documentation>Active</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="ANU">
                                      <xs:annotation>
                                        <xs:documentation>Annulled</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="APU">
                                      <xs:annotation>
                                        <xs:documentation>Accounted</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="CAT">
                                      <xs:annotation>
                                        <xs:documentation>Captive</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="DES">
                                      <xs:annotation>
                                        <xs:documentation>Expanded</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="FIN">
                                      <xs:annotation>
                                        <xs:documentation>Finalized</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="PEN">
                                      <xs:annotation>
                                        <xs:documentation>Pending</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="PRV">
                                      <xs:annotation>
                                        <xs:documentation>Provisional</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="LanguageCoded" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType name="Code">
                            <xs:restriction base="string1..3">
                              <xs:enumeration value="EN">
                                <xs:annotation>
                                  <xs:documentation>English</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="PT">
                                <xs:annotation>
                                  <xs:documentation>Portuguese</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="MessageTrailler">
        <xs:annotation>
          <xs:documentation>An element to indicate the end of a message, giving the total number of segments in the
message and the control reference number of the message.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="NumberOfSegments" type="decimal6">
              <xs:annotation>
                <xs:documentation>Control count of the segments in the message</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="MessageReferenceNumber" type="string1..14">
              <xs:annotation>
                <xs:documentation>Unique message reference number assigned by the sender</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/MessageHeader
diagram
properties
isRef 0
content complex
children MessageReferenceNumber MessageTypeIdentifier MessageTypeVersionNumber MessageTypeReleaseNumber ControlingAgency AssociationAssignedCode
annotation
documentation 
Service element to uniquely identify the message
source
<xs:element name="MessageHeader">
  <xs:annotation>
    <xs:documentation>Service element to uniquely identify the message</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="MessageReferenceNumber" type="string1..14">
        <xs:annotation>
          <xs:documentation>Unique message reference assigned by the sender</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageTypeIdentifier">
        <xs:annotation>
          <xs:documentation>Type of message assigned by its control agency</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..6">
            <xs:enumeration value="CUSRES">
              <xs:annotation>
                <xs:documentation>Customs response message</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageTypeVersionNumber">
        <xs:annotation>
          <xs:documentation>Version number of the message</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="D">
              <xs:annotation>
                <xs:documentation>Draft Version/UN/EDIFACT Directory</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageTypeReleaseNumber">
        <xs:annotation>
          <xs:documentation>Release number within the current message type version number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="97A">
              <xs:annotation>
                <xs:documentation>Release 1997 - A</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ControlingAgency">
        <xs:annotation>
          <xs:documentation>Code identifying the agency controlling the specification, maintenance and publication of the message type</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..2">
            <xs:enumeration value="UN">
              <xs:annotation>
                <xs:documentation>UN/ECE/TRADE/WP.4</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="AssociationAssignedCode" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..6"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/MessageHeader/MessageReferenceNumber
diagram
type string1..14
properties
isRef 0
content simple
facets
minLength 1
maxLength 14
annotation
documentation 
Unique message reference assigned by the sender
source
<xs:element name="MessageReferenceNumber" type="string1..14">
  <xs:annotation>
    <xs:documentation>Unique message reference assigned by the sender</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/MessageHeader/MessageTypeIdentifier
diagram
type restriction of string1..6
properties
isRef 0
content simple
facets
minLength 1
maxLength 6
enumeration CUSRES
annotation
documentation 
Type of message assigned by its control agency
source
<xs:element name="MessageTypeIdentifier">
  <xs:annotation>
    <xs:documentation>Type of message assigned by its control agency</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..6">
      <xs:enumeration value="CUSRES">
        <xs:annotation>
          <xs:documentation>Customs response message</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/MessageTypeVersionNumber
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration D
annotation
documentation 
Version number of the message
source
<xs:element name="MessageTypeVersionNumber">
  <xs:annotation>
    <xs:documentation>Version number of the message</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="D">
        <xs:annotation>
          <xs:documentation>Draft Version/UN/EDIFACT Directory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/MessageTypeReleaseNumber
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 97A
annotation
documentation 
Release number within the current message type version number
source
<xs:element name="MessageTypeReleaseNumber">
  <xs:annotation>
    <xs:documentation>Release number within the current message type version number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="97A">
        <xs:annotation>
          <xs:documentation>Release 1997 - A</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/ControlingAgency
diagram
type restriction of string1..2
properties
isRef 0
content simple
facets
minLength 1
maxLength 2
enumeration UN
annotation
documentation 
Code identifying the agency controlling the specification, maintenance and publication of the message type
source
<xs:element name="ControlingAgency">
  <xs:annotation>
    <xs:documentation>Code identifying the agency controlling the specification, maintenance and publication of the message type</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..2">
      <xs:enumeration value="UN">
        <xs:annotation>
          <xs:documentation>UN/ECE/TRADE/WP.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/AssociationAssignedCode
diagram
type restriction of string1..6
properties
isRef 0
content simple
facets
minLength 1
maxLength 6
annotation
documentation 
Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message
source
<xs:element name="AssociationAssignedCode" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..6"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage
diagram
properties
isRef 0
content complex
children DocumentName DocumentNumber MessageFunction ResponseType
annotation
documentation 
Element to indicate the type and the reference number of the message to which
the CUSRES is a response.
source
<xs:element name="BeginningOfMessage">
  <xs:annotation>
    <xs:documentation>Element to indicate the type and the reference number of the message to which
the CUSRES is a response.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentName">
        <xs:annotation>
          <xs:documentation>Document/Message identifier name, coded</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="962">
              <xs:annotation>
                <xs:documentation>Document response (Customs)</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DocumentNumber">
        <xs:annotation>
          <xs:documentation>Reference number assigned to the document/message by the issuer</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageFunction">
        <xs:annotation>
          <xs:documentation>Code indicating the function of the message</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="11">
              <xs:annotation>
                <xs:documentation>Response</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ResponseType">
        <xs:annotation>
          <xs:documentation>Code specifying the type of acknowledgment required or transmitted</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AP">
              <xs:annotation>
                <xs:documentation>Accepted</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="RE">
              <xs:annotation>
                <xs:documentation>Rejected</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/BeginningOfMessage/DocumentName
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 962
annotation
documentation 
Document/Message identifier name, coded
source
<xs:element name="DocumentName">
  <xs:annotation>
    <xs:documentation>Document/Message identifier name, coded</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="962">
        <xs:annotation>
          <xs:documentation>Document response (Customs)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage/DocumentNumber
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
Reference number assigned to the document/message by the issuer
source
<xs:element name="DocumentNumber">
  <xs:annotation>
    <xs:documentation>Reference number assigned to the document/message by the issuer</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage/MessageFunction
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 11
annotation
documentation 
Code indicating the function of the message
source
<xs:element name="MessageFunction">
  <xs:annotation>
    <xs:documentation>Code indicating the function of the message</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="11">
        <xs:annotation>
          <xs:documentation>Response</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage/ResponseType
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration AP
enumeration RE
annotation
documentation 
Code specifying the type of acknowledgment required or transmitted
source
<xs:element name="ResponseType">
  <xs:annotation>
    <xs:documentation>Code specifying the type of acknowledgment required or transmitted</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AP">
        <xs:annotation>
          <xs:documentation>Accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RE">
        <xs:annotation>
          <xs:documentation>Rejected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DateTimePeriod
diagram
properties
isRef 0
content complex
children DateTimePeriodQualifier DateTimePeriod DateTimePeriodFormatQualifier
annotation
documentation 
Element to indicate the date/time of the document/message
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Element to indicate the date/time of the document/message</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DateTimePeriodQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="137">
              <xs:annotation>
                <xs:documentation>Document/message date/time

Date/time when a document/message is issued. This may include auhentication</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="243">
              <xs:annotation>
                <xs:documentation>Transmission date/time of document</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:maxLength value="3"/>
            <xs:enumeration value="203">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="303">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DateTimePeriod/DateTimePeriodQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 137
enumeration 243
annotation
documentation 
Code giving specific meaning to a date, time or period
source
<xs:element name="DateTimePeriodQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="137">
        <xs:annotation>
          <xs:documentation>Document/message date/time

Date/time when a document/message is issued. This may include auhentication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="243">
        <xs:annotation>
          <xs:documentation>Transmission date/time of document</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DateTimePeriod/DateTimePeriod
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
The value of a date, a date and a tiem, a time or a period, in a specified representation
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/DateTimePeriod/DateTimePeriodFormatQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 203
enumeration 303
annotation
documentation 
Specification of the representation of a date, date and time or a period
source
<xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:maxLength value="3"/>
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="303">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/FreeText
diagram
properties
isRef 0
content complex
children TextSubjectQualifier FreeText
annotation
documentation 
An element to specify  supplementary processable information
source
<xs:element name="FreeText" minOccurs="0" maxOccurs="2">
  <xs:annotation>
    <xs:documentation>An element to specify  supplementary processable information</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TextSubjectQualifier">
        <xs:annotation>
          <xs:documentation>Code specifying the subject of the free text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="CUS">
              <xs:annotation>
                <xs:documentation>Customs declaration information</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="string1..70">
            <xs:enumeration value="ACT">
              <xs:annotation>
                <xs:documentation>Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ANU">
              <xs:annotation>
                <xs:documentation>Annulled</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FEC">
              <xs:annotation>
                <xs:documentation>Closed</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PAC">
              <xs:annotation>
                <xs:documentation>Pre-Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PRV">
              <xs:annotation>
                <xs:documentation>Provisional</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ULT">
              <xs:annotation>
                <xs:documentation>Ultimated</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/FreeText/TextSubjectQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration CUS
annotation
documentation 
Code specifying the subject of the free text
source
<xs:element name="TextSubjectQualifier">
  <xs:annotation>
    <xs:documentation>Code specifying the subject of the free text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="CUS">
        <xs:annotation>
          <xs:documentation>Customs declaration information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/FreeText/FreeText
diagram
type restriction of string1..70
properties
isRef 0
content simple
facets
minLength 1
maxLength 70
enumeration ACT
enumeration ANU
enumeration FEC
enumeration PAC
enumeration PRV
enumeration ULT
source
<xs:element name="FreeText" minOccurs="0">
  <xs:simpleType>
    <xs:restriction base="string1..70">
      <xs:enumeration value="ACT">
        <xs:annotation>
          <xs:documentation>Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ANU">
        <xs:annotation>
          <xs:documentation>Annulled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FEC">
        <xs:annotation>
          <xs:documentation>Closed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PAC">
        <xs:annotation>
          <xs:documentation>Pre-Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRV">
        <xs:annotation>
          <xs:documentation>Provisional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ULT">
        <xs:annotation>
          <xs:documentation>Ultimated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/GeneralIndicator
diagram
properties
isRef 0
content complex
children ProcessingIndicator
annotation
documentation 
An element to identifying the various customs processing indicators.

For backward compatibility only. No useful information will be provided. 
source
<xs:element name="GeneralIndicator" minOccurs="0">
  <xs:annotation>
    <xs:documentation>An element to identifying the various customs processing indicators.

For backward compatibility only. No useful information will be provided. </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ProcessingIndicator">
        <xs:annotation>
          <xs:documentation>Identifies the value to be attributed to indicators required by the processing system</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="1">
              <xs:annotation>
                <xs:documentation>Message content accepted</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="2">
              <xs:annotation>
                <xs:documentation>Message content rejected with comment</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/GeneralIndicator/ProcessingIndicator
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 1
enumeration 2
annotation
documentation 
Identifies the value to be attributed to indicators required by the processing system
source
<xs:element name="ProcessingIndicator">
  <xs:annotation>
    <xs:documentation>Identifies the value to be attributed to indicators required by the processing system</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="1">
        <xs:annotation>
          <xs:documentation>Message content accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="2">
        <xs:annotation>
          <xs:documentation>Message content rejected with comment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress
diagram
properties
isRef 0
content complex
children PartyQualifier PartyId CodeListQualifier CodeListResponsibleAgency
annotation
documentation 
An element to identify the name and/or address of the party related to all information
at the lower level of the message.
source
<xs:element name="NameAndAddress">
  <xs:annotation>
    <xs:documentation>An element to identify the name and/or address of the party related to all information
at the lower level of the message.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="PartyQualifier">
        <xs:annotation>
          <xs:documentation>Code giving a specific meaning to a party</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AE">
              <xs:annotation>
                <xs:documentation>Declarant's agent/representative</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CG">
              <xs:annotation>
                <xs:documentation>Carrier's agent</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CM">
              <xs:annotation>
                <xs:documentation>Customs</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MR">
              <xs:annotation>
                <xs:documentation>Message recipient</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MS">
              <xs:annotation>
                <xs:documentation>Document/message issuer/sender</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="PartyId">
        <xs:annotation>
          <xs:documentation>Code identifying a party involved in a transaction</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="CodeListQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification of a code list</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="113">
              <xs:annotation>
                <xs:documentation>Customs office</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="167">
              <xs:annotation>
                <xs:documentation>Tax party identification</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="CodeListResponsibleAgency" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code identifying the agency resopnsible for a code list</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:maxLength value="3"/>
            <xs:enumeration value="155">
              <xs:annotation>
                <xs:documentation>PT, Portuguese Customs</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/NameAndAddress/PartyQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration AE
enumeration CG
enumeration CM
enumeration MR
enumeration MS
annotation
documentation 
Code giving a specific meaning to a party
source
<xs:element name="PartyQualifier">
  <xs:annotation>
    <xs:documentation>Code giving a specific meaning to a party</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AE">
        <xs:annotation>
          <xs:documentation>Declarant's agent/representative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CG">
        <xs:annotation>
          <xs:documentation>Carrier's agent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CM">
        <xs:annotation>
          <xs:documentation>Customs</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MR">
        <xs:annotation>
          <xs:documentation>Message recipient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MS">
        <xs:annotation>
          <xs:documentation>Document/message issuer/sender</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress/PartyId
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
Code identifying a party involved in a transaction
source
<xs:element name="PartyId">
  <xs:annotation>
    <xs:documentation>Code identifying a party involved in a transaction</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress/CodeListQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 113
enumeration 167
annotation
documentation 
Identification of a code list
source
<xs:element name="CodeListQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification of a code list</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="113">
        <xs:annotation>
          <xs:documentation>Customs office</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="167">
        <xs:annotation>
          <xs:documentation>Tax party identification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress/CodeListResponsibleAgency
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 155
annotation
documentation 
Code identifying the agency resopnsible for a code list
source
<xs:element name="CodeListResponsibleAgency" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code identifying the agency resopnsible for a code list</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:maxLength value="3"/>
      <xs:enumeration value="155">
        <xs:annotation>
          <xs:documentation>PT, Portuguese Customs</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference
diagram
properties
isRef 0
content complex
children ReferenceQualifier ReferenceNumber DateTimePeriod
annotation
documentation 
Group of elements containing  references and constants that apply to the entire message
source
<xs:element name="Reference" maxOccurs="3">
  <xs:annotation>
    <xs:documentation>Group of elements containing  references and constants that apply to the entire message</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ReferenceQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a reference element or a reference number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="ABO">
              <xs:annotation>
                <xs:documentation>Originator's reference</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFM">
              <xs:annotation>
                <xs:documentation>Secondary customs reference</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ATZ">
              <xs:annotation>
                <xs:documentation>Ship's stay reference number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ReferenceNumber" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification number.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Element to identifying a date related to the preceding Reference</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DateTimePeriodQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="171">
                    <xs:annotation>
                      <xs:documentation>Reference Date/Time</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="203">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="303">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/Reference/ReferenceQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration ABO
enumeration AFM
enumeration ATZ
annotation
documentation 
Code giving specific meaning to a reference element or a reference number
source
<xs:element name="ReferenceQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a reference element or a reference number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="ABO">
        <xs:annotation>
          <xs:documentation>Originator's reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFM">
        <xs:annotation>
          <xs:documentation>Secondary customs reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ATZ">
        <xs:annotation>
          <xs:documentation>Ship's stay reference number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/ReferenceNumber
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
Identification number.
source
<xs:element name="ReferenceNumber" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification number.</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod
diagram
properties
isRef 0
content complex
children DateTimePeriodQualifier DateTimePeriod DateTimePeriodFormatQualifier
annotation
documentation 
Element to identifying a date related to the preceding Reference
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Element to identifying a date related to the preceding Reference</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DateTimePeriodQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="171">
              <xs:annotation>
                <xs:documentation>Reference Date/Time</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="203">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="303">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod/DateTimePeriodQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 171
annotation
documentation 
Code giving specific meaning to a date, time or period
source
<xs:element name="DateTimePeriodQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="171">
        <xs:annotation>
          <xs:documentation>Reference Date/Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod/DateTimePeriod
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
The value of a date, a date and a tiem, a time or a period, in a specified representation
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod/DateTimePeriodFormatQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 203
enumeration 303
annotation
documentation 
Specification of the representation of a date, date and time or a period
source
<xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="303">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails
diagram
properties
isRef 0
content complex
children DocumentDetails Reference FreeText DateTimePeriod ErrorPointDetails
source
<xs:element name="DocumentDetails" minOccurs="0" maxOccurs="unbounded">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentDetails">
        <xs:annotation>
          <xs:documentation>An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DocumentName" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Document/message identifier expressed in code</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="355">
                    <xs:annotation>
                      <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Document/message number</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Reference" minOccurs="0">
        <xs:annotation>
          <xs:documentation>An element identifying a particular reference, e.g. house of bill number, master bill
number.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReferenceQualifier">
              <xs:annotation>
                <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AAM">
                    <xs:annotation>
                      <xs:documentation>Waybill number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AAS">
                    <xs:annotation>
                      <xs:documentation>Transport document number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ABH">
                    <xs:annotation>
                      <xs:documentation>Sub-house bill of landing number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AEV">
                    <xs:annotation>
                      <xs:documentation>Shipping note number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AEW">
                    <xs:annotation>
                      <xs:documentation>Empty container bill number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AEX">
                    <xs:annotation>
                      <xs:documentation>Non-negotiable maritime transport</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFA">
                    <xs:annotation>
                      <xs:documentation>Through bill of lading number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFB">
                    <xs:annotation>
                      <xs:documentation>Cargo manifest number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFM">
                    <xs:annotation>
                      <xs:documentation>Secondary Customs reference</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="BM">
                    <xs:annotation>
                      <xs:documentation>Bill of landing number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="BN">
                    <xs:annotation>
                      <xs:documentation>Booking reference number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CT">
                    <xs:annotation>
                      <xs:documentation>Contract number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DQ">
                    <xs:annotation>
                      <xs:documentation>Delivery note number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="GDN">
                    <xs:annotation>
                      <xs:documentation>General declaration number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MB">
                    <xs:annotation>
                      <xs:documentation>Master bill of lading number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PK">
                    <xs:annotation>
                      <xs:documentation>Packing list number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ReferenceNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="FreeText">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TextSubjectQualifier">
              <xs:annotation>
                <xs:documentation>Code specifying the subject of the free text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="CUS">
                    <xs:annotation>
                      <xs:documentation>Customs declaration information</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="FreeText">
              <xs:simpleType>
                <xs:restriction base="string1..70">
                  <xs:enumeration value="ACT">
                    <xs:annotation>
                      <xs:documentation>Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ANU">
                    <xs:annotation>
                      <xs:documentation>Annulled</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DES">
                    <xs:annotation>
                      <xs:documentation>Expanded</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="FIN">
                    <xs:annotation>
                      <xs:documentation>Finalized</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PEN">
                    <xs:annotation>
                      <xs:documentation>Pending</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PRV">
                    <xs:annotation>
                      <xs:documentation>Provisional</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DateTimePeriod" maxOccurs="2">
        <xs:annotation>
          <xs:documentation>A segment identifying necessary dates</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DateTimePeriodQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="150">
                    <xs:annotation>
                      <xs:documentation>Declaration/presentation date</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="154">
                    <xs:annotation>
                      <xs:documentation>Acceptance date of document</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:maxLength value="3"/>
                  <xs:enumeration value="203">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="303">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ErrorPointDetails" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>An element to identifyi the location of an application error.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MessageSection" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="1">
                    <xs:annotation>
                      <xs:documentation>Heading section</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="2">
                    <xs:annotation>
                      <xs:documentation>Detail section of a message</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="7">
                    <xs:annotation>
                      <xs:documentation>Sub-line item</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="SegmentTag" type="string1..3" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Tag of a segment</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>
            <xs:element name="Reference" minOccurs="0">
              <xs:annotation>
                <xs:documentation>segment to provide the references related to the application error.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ReferenceQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="IB">
                          <xs:annotation>
                            <xs:documentation>In bond number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ApplicationErrorInformation" minOccurs="0">
              <xs:annotation>
                <xs:documentation>An element identifying the type of application errors within a message.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ApplicationErrorIdentification" type="string1..8"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="FreeText" minOccurs="0" maxOccurs="3">
              <xs:annotation>
                <xs:documentation>A segment to provide explanation and/or supplementary information related to the specified application error.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="TextSubjectQualifier">
                    <xs:annotation>
                      <xs:documentation>Code specifying the subject of the free text</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="AAO">
                          <xs:annotation>
                            <xs:documentation>Error description (free text)</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="CUS">
                          <xs:annotation>
                            <xs:documentation>Customs declaration information</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="TextLiteral" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Free text</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="FreeText" maxOccurs="5">
                          <xs:annotation>
                            <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="string1..70">
                              <xs:enumeration value="ACT">
                                <xs:annotation>
                                  <xs:documentation>Active</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="ANU">
                                <xs:annotation>
                                  <xs:documentation>Annulled</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="APU">
                                <xs:annotation>
                                  <xs:documentation>Accounted</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CAT">
                                <xs:annotation>
                                  <xs:documentation>Captive</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="DES">
                                <xs:annotation>
                                  <xs:documentation>Expanded</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="FIN">
                                <xs:annotation>
                                  <xs:documentation>Finalized</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="PEN">
                                <xs:annotation>
                                  <xs:documentation>Pending</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="PRV">
                                <xs:annotation>
                                  <xs:documentation>Provisional</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="LanguageCoded" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType name="Code">
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="EN">
                          <xs:annotation>
                            <xs:documentation>English</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PT">
                          <xs:annotation>
                            <xs:documentation>Portuguese</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/DocumentDetails
diagram
properties
isRef 0
content complex
children DocumentName DocumentNumber
annotation
documentation 
An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.
source
<xs:element name="DocumentDetails">
  <xs:annotation>
    <xs:documentation>An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentName" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Document/message identifier expressed in code</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="355">
              <xs:annotation>
                <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Document/message number</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/DocumentDetails/DocumentName
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 355
annotation
documentation 
Document/message identifier expressed in code
source
<xs:element name="DocumentName" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Document/message identifier expressed in code</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="355">
        <xs:annotation>
          <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DocumentDetails/DocumentNumber
diagram
type string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
Document/message number
source
<xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Document/message number</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/Reference
diagram
properties
isRef 0
content complex
children ReferenceQualifier ReferenceNumber
annotation
documentation 
An element identifying a particular reference, e.g. house of bill number, master bill
number.
source
<xs:element name="Reference" minOccurs="0">
  <xs:annotation>
    <xs:documentation>An element identifying a particular reference, e.g. house of bill number, master bill
number.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ReferenceQualifier">
        <xs:annotation>
          <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AAM">
              <xs:annotation>
                <xs:documentation>Waybill number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AAS">
              <xs:annotation>
                <xs:documentation>Transport document number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ABH">
              <xs:annotation>
                <xs:documentation>Sub-house bill of landing number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AEV">
              <xs:annotation>
                <xs:documentation>Shipping note number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AEW">
              <xs:annotation>
                <xs:documentation>Empty container bill number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AEX">
              <xs:annotation>
                <xs:documentation>Non-negotiable maritime transport</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFA">
              <xs:annotation>
                <xs:documentation>Through bill of lading number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFB">
              <xs:annotation>
                <xs:documentation>Cargo manifest number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFM">
              <xs:annotation>
                <xs:documentation>Secondary Customs reference</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BM">
              <xs:annotation>
                <xs:documentation>Bill of landing number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BN">
              <xs:annotation>
                <xs:documentation>Booking reference number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CT">
              <xs:annotation>
                <xs:documentation>Contract number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="DQ">
              <xs:annotation>
                <xs:documentation>Delivery note number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="GDN">
              <xs:annotation>
                <xs:documentation>General declaration number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MB">
              <xs:annotation>
                <xs:documentation>Master bill of lading number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PK">
              <xs:annotation>
                <xs:documentation>Packing list number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ReferenceNumber" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/Reference/ReferenceQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration AAM
enumeration AAS
enumeration ABH
enumeration AEV
enumeration AEW
enumeration AEX
enumeration AFA
enumeration AFB
enumeration AFM
enumeration BM
enumeration BN
enumeration CT
enumeration DQ
enumeration GDN
enumeration MB
enumeration PK
annotation
documentation 
Code giving a specific meaning to a reference element or a reference number
source
<xs:element name="ReferenceQualifier">
  <xs:annotation>
    <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AAM">
        <xs:annotation>
          <xs:documentation>Waybill number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AAS">
        <xs:annotation>
          <xs:documentation>Transport document number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ABH">
        <xs:annotation>
          <xs:documentation>Sub-house bill of landing number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AEV">
        <xs:annotation>
          <xs:documentation>Shipping note number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AEW">
        <xs:annotation>
          <xs:documentation>Empty container bill number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AEX">
        <xs:annotation>
          <xs:documentation>Non-negotiable maritime transport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFA">
        <xs:annotation>
          <xs:documentation>Through bill of lading number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFB">
        <xs:annotation>
          <xs:documentation>Cargo manifest number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFM">
        <xs:annotation>
          <xs:documentation>Secondary Customs reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BM">
        <xs:annotation>
          <xs:documentation>Bill of landing number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BN">
        <xs:annotation>
          <xs:documentation>Booking reference number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CT">
        <xs:annotation>
          <xs:documentation>Contract number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DQ">
        <xs:annotation>
          <xs:documentation>Delivery note number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GDN">
        <xs:annotation>
          <xs:documentation>General declaration number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MB">
        <xs:annotation>
          <xs:documentation>Master bill of lading number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PK">
        <xs:annotation>
          <xs:documentation>Packing list number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/Reference/ReferenceNumber
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute
source
<xs:element name="ReferenceNumber" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/FreeText
diagram
properties
isRef 0
content complex
children TextSubjectQualifier FreeText
source
<xs:element name="FreeText">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TextSubjectQualifier">
        <xs:annotation>
          <xs:documentation>Code specifying the subject of the free text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="CUS">
              <xs:annotation>
                <xs:documentation>Customs declaration information</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FreeText">
        <xs:simpleType>
          <xs:restriction base="string1..70">
            <xs:enumeration value="ACT">
              <xs:annotation>
                <xs:documentation>Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ANU">
              <xs:annotation>
                <xs:documentation>Annulled</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="DES">
              <xs:annotation>
                <xs:documentation>Expanded</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FIN">
              <xs:annotation>
                <xs:documentation>Finalized</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PEN">
              <xs:annotation>
                <xs:documentation>Pending</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PRV">
              <xs:annotation>
                <xs:documentation>Provisional</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/FreeText/TextSubjectQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration CUS
annotation
documentation 
Code specifying the subject of the free text
source
<xs:element name="TextSubjectQualifier">
  <xs:annotation>
    <xs:documentation>Code specifying the subject of the free text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="CUS">
        <xs:annotation>
          <xs:documentation>Customs declaration information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/FreeText/FreeText
diagram
type restriction of string1..70
properties
isRef 0
content simple
facets
minLength 1
maxLength 70
enumeration ACT
enumeration ANU
enumeration DES
enumeration FIN
enumeration PEN
enumeration PRV
source
<xs:element name="FreeText">
  <xs:simpleType>
    <xs:restriction base="string1..70">
      <xs:enumeration value="ACT">
        <xs:annotation>
          <xs:documentation>Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ANU">
        <xs:annotation>
          <xs:documentation>Annulled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DES">
        <xs:annotation>
          <xs:documentation>Expanded</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FIN">
        <xs:annotation>
          <xs:documentation>Finalized</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PEN">
        <xs:annotation>
          <xs:documentation>Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRV">
        <xs:annotation>
          <xs:documentation>Provisional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod
diagram
properties
isRef 0
content complex
children DateTimePeriodQualifier DateTimePeriod DateTimePeriodFormatQualifier
annotation
documentation 
A segment identifying necessary dates
source
<xs:element name="DateTimePeriod" maxOccurs="2">
  <xs:annotation>
    <xs:documentation>A segment identifying necessary dates</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DateTimePeriodQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="150">
              <xs:annotation>
                <xs:documentation>Declaration/presentation date</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="154">
              <xs:annotation>
                <xs:documentation>Acceptance date of document</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:maxLength value="3"/>
            <xs:enumeration value="203">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="303">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 150
enumeration 154
annotation
documentation 
Code giving specific meaning to a date, time or period
source
<xs:element name="DateTimePeriodQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="150">
        <xs:annotation>
          <xs:documentation>Declaration/presentation date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="154">
        <xs:annotation>
          <xs:documentation>Acceptance date of document</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriod
diagram
type restriction of string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
The value of a date, a date and a tiem, a time or a period, in a specified representation
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodFormatQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 203
enumeration 303
annotation
documentation 
Specification of the representation of a date, date and time or a period
source
<xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:maxLength value="3"/>
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="303">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails
diagram
properties
isRef 0
content complex
children MessageSection MessageItemNumber MessageSubItemNumber SegmentTag SequenceNumber Reference ApplicationErrorInformation FreeText
annotation
documentation 
An element to identifyi the location of an application error.
source
<xs:element name="ErrorPointDetails" maxOccurs="unbounded">
  <xs:annotation>
    <xs:documentation>An element to identifyi the location of an application error.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="MessageSection" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="1">
              <xs:annotation>
                <xs:documentation>Heading section</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="2">
              <xs:annotation>
                <xs:documentation>Detail section of a message</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="7">
              <xs:annotation>
                <xs:documentation>Sub-line item</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SegmentTag" type="string1..3" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Tag of a segment</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>
      <xs:element name="Reference" minOccurs="0">
        <xs:annotation>
          <xs:documentation>segment to provide the references related to the application error.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReferenceQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="IB">
                    <xs:annotation>
                      <xs:documentation>In bond number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ApplicationErrorInformation" minOccurs="0">
        <xs:annotation>
          <xs:documentation>An element identifying the type of application errors within a message.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ApplicationErrorIdentification" type="string1..8"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0" maxOccurs="3">
        <xs:annotation>
          <xs:documentation>A segment to provide explanation and/or supplementary information related to the specified application error.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TextSubjectQualifier">
              <xs:annotation>
                <xs:documentation>Code specifying the subject of the free text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AAO">
                    <xs:annotation>
                      <xs:documentation>Error description (free text)</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CUS">
                    <xs:annotation>
                      <xs:documentation>Customs declaration information</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="TextLiteral" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Free text</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="FreeText" maxOccurs="5">
                    <xs:annotation>
                      <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..70">
                        <xs:enumeration value="ACT">
                          <xs:annotation>
                            <xs:documentation>Active</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="ANU">
                          <xs:annotation>
                            <xs:documentation>Annulled</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="APU">
                          <xs:annotation>
                            <xs:documentation>Accounted</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="CAT">
                          <xs:annotation>
                            <xs:documentation>Captive</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="DES">
                          <xs:annotation>
                            <xs:documentation>Expanded</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="FIN">
                          <xs:annotation>
                            <xs:documentation>Finalized</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PEN">
                          <xs:annotation>
                            <xs:documentation>Pending</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PRV">
                          <xs:annotation>
                            <xs:documentation>Provisional</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="LanguageCoded" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
              </xs:annotation>
              <xs:simpleType name="Code">
                <xs:restriction base="string1..3">
                  <xs:enumeration value="EN">
                    <xs:annotation>
                      <xs:documentation>English</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PT">
                    <xs:annotation>
                      <xs:documentation>Portuguese</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/MessageSection
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration 1
enumeration 2
enumeration 7
annotation
documentation 
Recognition of a particular part of a message.
source
<xs:element name="MessageSection" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="1">
        <xs:annotation>
          <xs:documentation>Heading section</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="2">
        <xs:annotation>
          <xs:documentation>Detail section of a message</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="7">
        <xs:annotation>
          <xs:documentation>Sub-line item</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/MessageItemNumber
diagram
type string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
The referenced number allocated to an identifiable item in a message
source
<xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/MessageSubItemNumber
diagram
type decimal6
properties
isRef 0
content simple
facets
totalDigits 6
annotation
documentation 
The reference number allocated to an identifiable sub-item in a message
source
<xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/SegmentTag
diagram
type string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
annotation
documentation 
Tag of a segment
source
<xs:element name="SegmentTag" type="string1..3" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Tag of a segment</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/SequenceNumber
diagram
type string1..10
properties
isRef 0
content simple
facets
minLength 1
maxLength 10
source
<xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>

element CusresMessage/DocumentDetails/ErrorPointDetails/Reference
diagram
properties
isRef 0
content complex
children ReferenceQualifier ReferenceNumber
annotation
documentation 
segment to provide the references related to the application error.
source
<xs:element name="Reference" minOccurs="0">
  <xs:annotation>
    <xs:documentation>segment to provide the references related to the application error.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ReferenceQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="IB">
              <xs:annotation>
                <xs:documentation>In bond number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration IB
annotation
documentation 
Code giving specific meaning to a reference segment or a reference number
source
<xs:element name="ReferenceQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="IB">
        <xs:annotation>
          <xs:documentation>In bond number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceNumber
diagram
type string1..35
properties
isRef 0
content simple
facets
minLength 1
maxLength 35
annotation
documentation 
Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.
source
<xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/ApplicationErrorInformation
diagram
properties
isRef 0
content complex
children ApplicationErrorIdentification
annotation
documentation 
An element identifying the type of application errors within a message.
source
<xs:element name="ApplicationErrorInformation" minOccurs="0">
  <xs:annotation>
    <xs:documentation>An element identifying the type of application errors within a message.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ApplicationErrorIdentification" type="string1..8"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/ApplicationErrorInformation/ApplicationErrorIdentification
diagram
type string1..8
properties
isRef 0
content simple
facets
minLength 1
maxLength 8
source
<xs:element name="ApplicationErrorIdentification" type="string1..8"/>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText
diagram
properties
isRef 0
content complex
children TextSubjectQualifier TextLiteral LanguageCoded
annotation
documentation 
A segment to provide explanation and/or supplementary information related to the specified application error.
source
<xs:element name="FreeText" minOccurs="0" maxOccurs="3">
  <xs:annotation>
    <xs:documentation>A segment to provide explanation and/or supplementary information related to the specified application error.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TextSubjectQualifier">
        <xs:annotation>
          <xs:documentation>Code specifying the subject of the free text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AAO">
              <xs:annotation>
                <xs:documentation>Error description (free text)</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CUS">
              <xs:annotation>
                <xs:documentation>Customs declaration information</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="TextLiteral" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Free text</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="FreeText" maxOccurs="5">
              <xs:annotation>
                <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..70">
                  <xs:enumeration value="ACT">
                    <xs:annotation>
                      <xs:documentation>Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ANU">
                    <xs:annotation>
                      <xs:documentation>Annulled</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="APU">
                    <xs:annotation>
                      <xs:documentation>Accounted</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CAT">
                    <xs:annotation>
                      <xs:documentation>Captive</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DES">
                    <xs:annotation>
                      <xs:documentation>Expanded</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="FIN">
                    <xs:annotation>
                      <xs:documentation>Finalized</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PEN">
                    <xs:annotation>
                      <xs:documentation>Pending</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PRV">
                    <xs:annotation>
                      <xs:documentation>Provisional</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="LanguageCoded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
        </xs:annotation>
        <xs:simpleType name="Code">
          <xs:restriction base="string1..3">
            <xs:enumeration value="EN">
              <xs:annotation>
                <xs:documentation>English</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PT">
              <xs:annotation>
                <xs:documentation>Portuguese</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextSubjectQualifier
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration AAO
enumeration CUS
annotation
documentation 
Code specifying the subject of the free text
source
<xs:element name="TextSubjectQualifier">
  <xs:annotation>
    <xs:documentation>Code specifying the subject of the free text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AAO">
        <xs:annotation>
          <xs:documentation>Error description (free text)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CUS">
        <xs:annotation>
          <xs:documentation>Customs declaration information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextLiteral
diagram
properties
isRef 0
content complex
children FreeText
annotation
documentation 
Free text
source
<xs:element name="TextLiteral" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Free text</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="FreeText" maxOccurs="5">
        <xs:annotation>
          <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..70">
            <xs:enumeration value="ACT">
              <xs:annotation>
                <xs:documentation>Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ANU">
              <xs:annotation>
                <xs:documentation>Annulled</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="APU">
              <xs:annotation>
                <xs:documentation>Accounted</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CAT">
              <xs:annotation>
                <xs:documentation>Captive</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="DES">
              <xs:annotation>
                <xs:documentation>Expanded</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FIN">
              <xs:annotation>
                <xs:documentation>Finalized</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PEN">
              <xs:annotation>
                <xs:documentation>Pending</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PRV">
              <xs:annotation>
                <xs:documentation>Provisional</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextLiteral/FreeText
diagram
type restriction of string1..70
properties
isRef 0
content simple
facets
minLength 1
maxLength 70
enumeration ACT
enumeration ANU
enumeration APU
enumeration CAT
enumeration DES
enumeration FIN
enumeration PEN
enumeration PRV
annotation
documentation 
Free text field available to the message sender for information.
source
<xs:element name="FreeText" maxOccurs="5">
  <xs:annotation>
    <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..70">
      <xs:enumeration value="ACT">
        <xs:annotation>
          <xs:documentation>Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ANU">
        <xs:annotation>
          <xs:documentation>Annulled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APU">
        <xs:annotation>
          <xs:documentation>Accounted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CAT">
        <xs:annotation>
          <xs:documentation>Captive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DES">
        <xs:annotation>
          <xs:documentation>Expanded</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FIN">
        <xs:annotation>
          <xs:documentation>Finalized</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PEN">
        <xs:annotation>
          <xs:documentation>Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRV">
        <xs:annotation>
          <xs:documentation>Provisional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/LanguageCoded
diagram
type restriction of string1..3
properties
isRef 0
content simple
facets
minLength 1
maxLength 3
enumeration EN
enumeration PT
annotation
documentation 
Code of language (ISO 639-1988).
source
<xs:element name="LanguageCoded" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
  </xs:annotation>
  <xs:simpleType name="Code">
    <xs:restriction base="string1..3">
      <xs:enumeration value="EN">
        <xs:annotation>
          <xs:documentation>English</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PT">
        <xs:annotation>
          <xs:documentation>Portuguese</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageTrailler
diagram
properties
isRef 0
content complex
children NumberOfSegments MessageReferenceNumber
annotation
documentation 
An element to indicate the end of a message, giving the total number of segments in the
message and the control reference number of the message.
source
<xs:element name="MessageTrailler">
  <xs:annotation>
    <xs:documentation>An element to indicate the end of a message, giving the total number of segments in the
message and the control reference number of the message.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="NumberOfSegments" type="decimal6">
        <xs:annotation>
          <xs:documentation>Control count of the segments in the message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageReferenceNumber" type="string1..14">
        <xs:annotation>
          <xs:documentation>Unique message reference number assigned by the sender</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/MessageTrailler/NumberOfSegments
diagram
type decimal6
properties
isRef 0
content simple
facets
totalDigits 6
annotation
documentation 
Control count of the segments in the message
source
<xs:element name="NumberOfSegments" type="decimal6">
  <xs:annotation>
    <xs:documentation>Control count of the segments in the message</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/MessageTrailler/MessageReferenceNumber
diagram
type string1..14
properties
isRef 0
content simple
facets
minLength 1
maxLength 14
annotation
documentation 
Unique message reference number assigned by the sender
source
<xs:element name="MessageReferenceNumber" type="string1..14">
  <xs:annotation>
    <xs:documentation>Unique message reference number assigned by the sender</xs:documentation>
  </xs:annotation>
</xs:element>

simpleType decimal12
type restriction of xs:integer
facets
totalDigits 12
source
<xs:simpleType name="decimal12">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="12"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal15
type restriction of xs:integer
facets
totalDigits 15
source
<xs:simpleType name="decimal15">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="15"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal18
type restriction of xs:integer
facets
totalDigits 18
source
<xs:simpleType name="decimal18">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="18"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal2
type restriction of xs:integer
facets
totalDigits 2
source
<xs:simpleType name="decimal2">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="2"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal3
type restriction of xs:integer
facets
totalDigits 3
source
<xs:simpleType name="decimal3">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="3"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal4
type restriction of xs:integer
facets
totalDigits 4
source
<xs:simpleType name="decimal4">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="4"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal5
type restriction of xs:integer
facets
totalDigits 5
source
<xs:simpleType name="decimal5">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="5"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal6
type restriction of xs:integer
used by
elements CusresMessage/DocumentDetails/ErrorPointDetails/MessageSubItemNumber CusresMessage/MessageTrailler/NumberOfSegments
facets
totalDigits 6
source
<xs:simpleType name="decimal6">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="6"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal8
type restriction of xs:integer
facets
totalDigits 8
source
<xs:simpleType name="decimal8">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="8"/>
  </xs:restriction>
</xs:simpleType>

simpleType integer1..n
type xs:integer
source
<xs:simpleType name="integer1..n">
  <xs:restriction base="xs:integer"/>
</xs:simpleType>

simpleType string0..1
type restriction of xs:string
facets
minLength 0
maxLength 1
source
<xs:simpleType name="string0..1">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="1"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..10
type restriction of xs:string
facets
minLength 0
maxLength 10
source
<xs:simpleType name="string0..10">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="10"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..17
type restriction of xs:string
facets
minLength 0
maxLength 17
source
<xs:simpleType name="string0..17">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="17"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..18
type restriction of xs:string
facets
minLength 0
maxLength 18
source
<xs:simpleType name="string0..18">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="18"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..25
type restriction of xs:string
facets
minLength 0
maxLength 25
source
<xs:simpleType name="string0..25">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="25"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..26
type restriction of xs:string
facets
minLength 0
maxLength 26
source
<xs:simpleType name="string0..26">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="26"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..3
type restriction of xs:string
facets
minLength 0
maxLength 3
source
<xs:simpleType name="string0..3">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="3"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..35
type restriction of xs:string
facets
minLength 0
maxLength 35
source
<xs:simpleType name="string0..35">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="35"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..4
type restriction of xs:string
facets
minLength 0
maxLength 4
source
<xs:simpleType name="string0..4">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="4"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..6
type restriction of xs:string
facets
minLength 0
maxLength 6
source
<xs:simpleType name="string0..6">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="6"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..7
type restriction of xs:string
facets
minLength 0
maxLength 7
source
<xs:simpleType name="string0..7">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="7"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..70
type restriction of xs:string
facets
minLength 0
maxLength 70
source
<xs:simpleType name="string0..70">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="70"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..8
type restriction of xs:string
facets
minLength 0
maxLength 8
source
<xs:simpleType name="string0..8">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="8"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..9
type restriction of xs:string
facets
minLength 0
maxLength 9
source
<xs:simpleType name="string0..9">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="9"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..10
type restriction of xs:string
used by
element CusresMessage/DocumentDetails/ErrorPointDetails/SequenceNumber
facets
minLength 1
maxLength 10
source
<xs:simpleType name="string1..10">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="10"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..14
type restriction of xs:string
used by
elements CusresMessage/MessageHeader/MessageReferenceNumber CusresMessage/MessageTrailler/MessageReferenceNumber
facets
minLength 1
maxLength 14
source
<xs:simpleType name="string1..14">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="14"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..17
type restriction of xs:string
facets
minLength 1
maxLength 17
source
<xs:simpleType name="string1..17">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="17"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..18
type restriction of xs:string
facets
minLength 1
maxLength 18
source
<xs:simpleType name="string1..18">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="18"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..2
type restriction of xs:string
used by
element CusresMessage/MessageHeader/ControlingAgency
facets
minLength 1
maxLength 2
source
<xs:simpleType name="string1..2">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="2"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..25
type restriction of xs:string
facets
minLength 1
maxLength 25
source
<xs:simpleType name="string1..25">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="25"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..3
type restriction of xs:string
used by
elements CusresMessage/NameAndAddress/CodeListQualifier CusresMessage/NameAndAddress/CodeListResponsibleAgency CusresMessage/DateTimePeriod/DateTimePeriodFormatQualifier CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodFormatQualifier CusresMessage/Reference/DateTimePeriod/DateTimePeriodFormatQualifier CusresMessage/DateTimePeriod/DateTimePeriodQualifier CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodQualifier CusresMessage/Reference/DateTimePeriod/DateTimePeriodQualifier CusresMessage/BeginningOfMessage/DocumentName CusresMessage/DocumentDetails/DocumentDetails/DocumentName CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/LanguageCoded CusresMessage/BeginningOfMessage/MessageFunction CusresMessage/DocumentDetails/ErrorPointDetails/MessageSection CusresMessage/MessageHeader/MessageTypeReleaseNumber CusresMessage/MessageHeader/MessageTypeVersionNumber CusresMessage/NameAndAddress/PartyQualifier CusresMessage/GeneralIndicator/ProcessingIndicator CusresMessage/Reference/ReferenceQualifier CusresMessage/DocumentDetails/Reference/ReferenceQualifier CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceQualifier CusresMessage/BeginningOfMessage/ResponseType CusresMessage/DocumentDetails/ErrorPointDetails/SegmentTag CusresMessage/DocumentDetails/FreeText/TextSubjectQualifier CusresMessage/FreeText/TextSubjectQualifier CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextSubjectQualifier
facets
minLength 1
maxLength 3
source
<xs:simpleType name="string1..3">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="3"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..35
type restriction of xs:string
used by
elements CusresMessage/DateTimePeriod/DateTimePeriod CusresMessage/Reference/DateTimePeriod/DateTimePeriod CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriod CusresMessage/BeginningOfMessage/DocumentNumber CusresMessage/DocumentDetails/DocumentDetails/DocumentNumber CusresMessage/DocumentDetails/ErrorPointDetails/MessageItemNumber CusresMessage/NameAndAddress/PartyId CusresMessage/Reference/ReferenceNumber CusresMessage/DocumentDetails/Reference/ReferenceNumber CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceNumber
facets
minLength 1
maxLength 35
source
<xs:simpleType name="string1..35">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="35"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..512
type restriction of xs:string
facets
minLength 1
maxLength 512
source
<xs:simpleType name="string1..512">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="512"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..6
type restriction of xs:string
used by
elements CusresMessage/MessageHeader/AssociationAssignedCode CusresMessage/MessageHeader/MessageTypeIdentifier
facets
minLength 1
maxLength 6
source
<xs:simpleType name="string1..6">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="6"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..70
type restriction of xs:string
used by
elements CusresMessage/FreeText/FreeText CusresMessage/DocumentDetails/FreeText/FreeText CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextLiteral/FreeText
facets
minLength 1
maxLength 70
source
<xs:simpleType name="string1..70">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="70"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..8
type restriction of xs:string
used by
element CusresMessage/DocumentDetails/ErrorPointDetails/ApplicationErrorInformation/ApplicationErrorIdentification
facets
minLength 1
maxLength 8
source
<xs:simpleType name="string1..8">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="8"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..9
type restriction of xs:string
facets
minLength 1
maxLength 9
source
<xs:simpleType name="string1..9">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="9"/>
  </xs:restriction>
</xs:simpleType>


XML Schema documentation generated with
XMLSpy Schema Editor http://www.altova.com/xmlspy