<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:emcs="http://www.icisnet.gr/emcs/phase3/v2.00/types" xmlns:doc="http://www.icisnet.gr/emcs/phase3/v2.00/doc" targetNamespace="http://www.icisnet.gr/emcs/phase3/v2.00/types" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.00">
  <!--=========================================-->
  <!--===   EMCS Simple Types Definitions   ===-->
  <!--=========================================-->
  <!--===== Imports =====-->
  <xs:import namespace="http://www.icisnet.gr/emcs/phase3/v2.00/doc" schemaLocation="doc.xsd" />
  <!--==========================================================-->
  <!--===          AdministrativeReferenceCodeType           ===-->
  <!--==========================================================-->
  <xs:simpleType name="AdministrativeReferenceCodeType">
    <xs:restriction base="xs:token">
      <xs:length value="21" />
      <xs:pattern value="[0-9]{2}[A-Z]{2}[A-Z0-9]{16}[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===             ControlReportReferenceType             ===-->
  <!--==========================================================-->
  <xs:simpleType name="ControlReportReferenceType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Control Report Reference" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="16" />
      <xs:pattern value="[A-Z]{2}[a-zA-Z0-9]{13}[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  CountryCodeType                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="CountryCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Country Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    DateTimeType                    ===-->
  <!--==========================================================-->
  <xs:simpleType name="DateTimeType">
    <xs:annotation>
      <xs:documentation>The date is in the Common Era (minus sign in years is not permitted) and time zone although not included UTC is implied</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:dateTime">
      <xs:pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      DateType                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="DateType">
    <xs:annotation>
      <xs:documentation>The date is in the Common Era (minus sign in years is not permitted)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:date">
      <xs:pattern value="\d{4}-\d{2}-\d{2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               EventReportNumberType                ===-->
  <!--==========================================================-->
  <xs:simpleType name="EventReportNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Event Report Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="16" />
      <xs:pattern value="[A-Z]{2}[a-zA-Z0-9]{13}[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  ExciseNumberType                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="ExciseNumberType">
    <xs:restriction base="xs:token">
      <xs:length value="13" />
      <xs:pattern value="[A-Z]{2}[a-zA-Z0-9]{11}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                ExciseOfficeCodeType                ===-->
  <!--==========================================================-->
  <xs:simpleType name="ExciseOfficeCodeType">
    <xs:restriction base="xs:token">
      <xs:length value="8" />
      <xs:pattern value="[A-Z]{2}[a-zA-Z0-9]{6}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  JourneyTimeType                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="JourneyTimeType">
    <xs:annotation>
      <xs:documentation>The format of Journey Time or of Maximum Journey Time is expressed in hours or in days, 
        with the format Pdd, where:
        - "P" is a letter in ("H" = Hours or "D" = Day)
        - "dd" is a two digits number
        If P is "H" then the number is less or equal to 24
        If P is "D" then the number is less or equal to 92
        
        The maximum 92 days period for the journey time is derived from the maximum limit of the TIM_EAD timer defined in Appendix H.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="3" />
      <xs:pattern value="H([01][0-9]|2[0-4])|D([0-8][0-9]|9[0-2])" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  LanguageCodeType                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="LanguageCodeType">
    <xs:restriction base="xs:token">
      <xs:length value="2" />
      <xs:pattern value="[a-z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                MemberStateCodeType                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="MemberStateCodeType">
    <xs:restriction base="xs:token">
      <xs:length value="2" />
      <xs:pattern value="[A-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===          StampRequestReferenceNumberType           ===-->
  <!--==========================================================-->
  <xs:simpleType name="StampRequestReferenceNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Stamp Request Reference Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="14" />
      <xs:maxLength value="21" />
      <xs:pattern value=".{14,21}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      TimeType                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="TimeType">
    <xs:annotation>
      <xs:documentation>The time zone although not included UTC is implied</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:time">
      <xs:pattern value="\d{2}:\d{2}:\d{2}(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Actual Quantity                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="ActualQuantityType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Actual Quantity" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="3" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Alcoholic Strength                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="AlcoholicStrengthType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Alcoholic Strength" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="5" />
      <xs:fractionDigits value="2" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===       Alert or Rejection of E-AD Reason Code       ===-->
  <!--==========================================================-->
  <xs:simpleType name="AlertOrRejectionOfEadReasonCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Alert or Rejection of E-AD Reason Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Associated Information               ===-->
  <!--==========================================================-->
  <xs:simpleType name="AssociatedInformationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Associated Information" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===            Body Record Unique Reference            ===-->
  <!--==========================================================-->
  <xs:simpleType name="BodyRecordUniqueReferenceType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Body Record Unique Reference" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="3" />
      <xs:pattern value="[0-9]{1,3}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Brand Name of Products               ===-->
  <!--==========================================================-->
  <xs:simpleType name="BrandNameOfProductsType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Brand Name of Products" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===              Cancellation Reason Code              ===-->
  <!--==========================================================-->
  <xs:simpleType name="CancellationReasonCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Cancellation Reason Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                        City                        ===-->
  <!--==========================================================-->
  <xs:simpleType name="CityType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="City" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="50" />
      <xs:pattern value=".{1,50}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      CN Code                       ===-->
  <!--==========================================================-->
  <xs:simpleType name="CnCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="CN Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="8" />
      <xs:pattern value="[0-9]{8}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      Comments                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="CommentsType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Comments" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Commercial Description               ===-->
  <!--==========================================================-->
  <xs:simpleType name="CommercialDescriptionType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Commercial Description" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===           Commercial Seal Identification           ===-->
  <!--==========================================================-->
  <xs:simpleType name="CommercialSealIdentificationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Commercial Seal Identification" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===             Complementary Information              ===-->
  <!--==========================================================-->
  <xs:simpleType name="ComplementaryInformationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Complementary Information" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Degree Plato                    ===-->
  <!--==========================================================-->
  <xs:simpleType name="DegreePlatoType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Degree Plato" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="5" />
      <xs:fractionDigits value="2" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      Density                       ===-->
  <!--==========================================================-->
  <xs:simpleType name="DensityType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Density" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="5" />
      <xs:fractionDigits value="2" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Designation of Origin                ===-->
  <!--==========================================================-->
  <xs:simpleType name="DesignationOfOriginType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Designation of Origin" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                Document Description                ===-->
  <!--==========================================================-->
  <xs:simpleType name="DocumentDescriptionType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Document Description" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===             Document Reference Number              ===-->
  <!--==========================================================-->
  <xs:simpleType name="DocumentReferenceNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Document Reference Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="21" />
      <xs:pattern value=".{1,21}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
<!--===                    EORI Number                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="EoriNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="EORI Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="17" />
      <xs:pattern value=".{1,17}" />
    </xs:restriction>
  </xs:simpleType>
  <!--===                Error Column Number                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="ErrorColumnNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Error Column Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="9" />
      <xs:pattern value="[0-9]{1,9}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Error Line Number                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="ErrorLineNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Error Line Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="9" />
      <xs:pattern value="[0-9]{1,9}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                   Error Location                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="ErrorLocationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Error Location" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Error Reason                    ===-->
  <!--==========================================================-->
  <xs:simpleType name="ErrorReasonType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Error Reason" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Event Type Code                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="EventTypeCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Event Type Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Evidence Type Code                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="EvidenceTypeCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Evidence Type Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===              Evidence Type Complement              ===-->
  <!--==========================================================-->
  <xs:simpleType name="EvidenceTypeComplementType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Evidence Type Complement" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===           Excise Officer Identification            ===-->
  <!--==========================================================-->
  <xs:simpleType name="ExciseOfficerIdentificationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Excise Officer Identification" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                Excise Product Code                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="ExciseProductCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Excise Product Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="4" />
      <xs:pattern value=".{4}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Explanation Code                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="ExplanationCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Explanation Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Explanation                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="ExplanationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Explanation" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Fiscal Mark                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="FiscalMarkType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Fiscal Mark" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Global Explanation                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="GlobalExplanationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Global Explanation" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Gross Weight                    ===-->
  <!--==========================================================-->
  <xs:simpleType name="GrossWeightType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Gross Weight" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="2" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Guarantee Amount                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="GuaranteeAmountType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Guarantee Amount" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="2" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===             Guarantee Reference Number             ===-->
  <!--==========================================================-->
  <xs:simpleType name="GuaranteeReferenceNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Guarantee Reference Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="17" />
      <xs:pattern value=".{1,17}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===      Identification of Sender Customs Officer      ===-->
  <!--==========================================================-->
  <xs:simpleType name="IdentificationOfSenderCustomsOfficerType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Identification of Sender Customs Officer" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===            Identity of Transport Units             ===-->
  <!--==========================================================-->
  <xs:simpleType name="IdentityOfTransportUnitsType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Identity of Transport Units" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Import SAD Number                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="ImportSadNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Import SAD Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="21" />
      <xs:pattern value=".{1,21}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Import SAD Row Number                ===-->
  <!--==========================================================-->
  <xs:simpleType name="ImportSadRowNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Import SAD Row Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="3" />
      <xs:pattern value="[0-9]{1,3}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                   Invoice Number                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="InvoiceNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Invoice Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Issuing Authority                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="IssuingAuthorityType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Issuing Authority" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Kind of packages                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="KindOfPackagesType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Kind of packages" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="2" />
      <xs:pattern value=".{2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Local Reference Number               ===-->
  <!--==========================================================-->
  <xs:simpleType name="LocalReferenceNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Local Reference Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="22" />
      <xs:pattern value=".{1,22}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===      MS of Submission Event Report Reference       ===-->
  <!--==========================================================-->
  <xs:simpleType name="MsOfSubmissionEventReportReferenceType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="MS of Submission Event Report Reference" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                National Product ID                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="NationalProductIdType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="National Product ID" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="10" />
      <xs:pattern value=".{10}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                     Net Weight                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="NetWeightType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Net Weight" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="2" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Number of packages                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="NumberOfPackagesType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Number of packages" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="15" />
      <xs:pattern value="[0-9]{1,15}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===            Observed Shortage or Excess             ===-->
  <!--==========================================================-->
  <xs:simpleType name="ObservedShortageOrExcessType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Observed Shortage or Excess" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="3" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===              Original Attribute Value              ===-->
  <!--==========================================================-->
  <xs:simpleType name="OriginalAttributeValueType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Original Attribute Value" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Other Information                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="OtherInformationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Other Information" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                   Place of Event                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="PlaceOfEventType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Place of Event" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      Postcode                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="PostcodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Postcode" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="10" />
      <xs:pattern value=".{1,10}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      Quantity                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="QuantityType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Quantity" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="3" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===            Reason for Interruption Code            ===-->
  <!--==========================================================-->
  <xs:simpleType name="ReasonForInterruptionCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Reason for Interruption Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Reference of Document                ===-->
  <!--==========================================================-->
  <xs:simpleType name="ReferenceOfDocumentType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Reference of Document" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Reference of Evidence                ===-->
  <!--==========================================================-->
  <xs:simpleType name="ReferenceOfEvidenceType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Reference of Evidence" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Refused Quantity                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="RefusedQuantityType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Refused Quantity" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="3" />
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                Reminder Information                ===-->
  <!--==========================================================-->
  <xs:simpleType name="ReminderInformationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Reminder Information" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Seal Information                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="SealInformationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Seal Information" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Sequence Number                   ===-->
  <!--==========================================================-->
  <xs:simpleType name="SequenceNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Sequence Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===     Serial Number of Certificate of Exemption      ===-->
  <!--==========================================================-->
  <xs:simpleType name="SerialNumberOfCertificateOfExemptionType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Serial Number of Certificate of Exemption" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="255" />
      <xs:pattern value=".{1,255}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                  Size of Producer                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="SizeOfProducerType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Size of Producer" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="15" />
      <xs:pattern value="[0-9]{1,15}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Street Name                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="StreetNameType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Street Name" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="65" />
      <xs:pattern value=".{1,65}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                   Street Number                    ===-->
  <!--==========================================================-->
  <xs:simpleType name="StreetNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Street Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="11" />
      <xs:pattern value=".{1,11}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Submitting Person Code               ===-->
  <!--==========================================================-->
  <xs:simpleType name="SubmittingPersonCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Submitting Person Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===            Submitting Person Complement            ===-->
  <!--==========================================================-->
  <xs:simpleType name="SubmittingPersonComplementType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Submitting Person Complement" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                 Submitting Person                  ===-->
  <!--==========================================================-->
  <xs:simpleType name="SubmittingPersonType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Submitting Person" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                   Tax ID Number                    ===-->
  <!--==========================================================-->
  <xs:simpleType name="TaxIdNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Tax ID Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="12" />
      <xs:pattern value=".{1,12}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                    Trader Name                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="TraderNameType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Trader Name" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="182" />
      <xs:pattern value=".{1,182}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                      TraderID                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="TraderidType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="TraderID" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="16" />
      <xs:pattern value=".{1,16}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                Transport Mode Code                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="TransportModeCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Transport Mode Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                Transport Unit Code                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="TransportUnitCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Transport Unit Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===             Unsatisfactory Reason Code             ===-->
  <!--==========================================================-->
  <xs:simpleType name="UnsatisfactoryReasonCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Unsatisfactory Reason Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                     VAT Number                     ===-->
  <!--==========================================================-->
  <xs:simpleType name="VatNumberType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="VAT Number" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="14" />
      <xs:pattern value=".{1,14}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===               Wine-Growing Zone Code               ===-->
  <!--==========================================================-->
  <xs:simpleType name="WineGrowingZoneCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Wine-Growing Zone Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <!--==========================================================-->
  <!--===                Wine Operation Code                 ===-->
  <!--==========================================================-->
  <xs:simpleType name="WineOperationCodeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Wine Operation Code" />
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

