<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.00">
  <!--=========================================-->
  <!--===== ICS Simple Types -->
  <!--===== DDNIA V13.00  -->
  <!--===== Included Features: [10, 12, 18, 20, 26, 27, 28, 29]  -->
  <!--=========================================-->
  <!--===== Includes =====-->
  <xs:include schemaLocation="simple_types.xsd" />
  <xs:include schemaLocation="doc.xsd" />
  <!--===== Data Item Types =====-->
  <xs:simpleType name="AlphanumericSpecMax35Type">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="35" />
      <xs:pattern value="[a-zA-Z]{2}.{1,33}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_10">
    <xs:restriction base="AlphaNumType">
      <xs:length value="10" />
      <xs:pattern value=".{10}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_19">
    <xs:restriction base="AlphaNumType">
      <xs:length value="19" />
      <xs:pattern value=".{19}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_22">
    <xs:restriction base="AlphaNumType">
      <xs:length value="22" />
      <xs:pattern value=".{22}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_35">
    <xs:restriction base="AlphaNumType">
      <xs:length value="35" />
      <xs:pattern value=".{35}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_5">
    <xs:restriction base="AlphaNumType">
      <xs:length value="5" />
      <xs:pattern value=".{5}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_50">
    <xs:restriction base="AlphaNumType">
      <xs:length value="50" />
      <xs:pattern value=".{50}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_9">
    <xs:restriction base="AlphaNumType">
      <xs:length value="9" />
      <xs:pattern value=".{9}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max10">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="10" />
      <xs:pattern value=".{1,10}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max1000">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="1000" />
      <xs:pattern value=".{1,1000}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max13">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="13" />
      <xs:pattern value=".{1,13}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max15">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="15" />
      <xs:pattern value=".{1,15}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max16">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="16" />
      <xs:pattern value=".{1,16}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max19">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="19" />
      <xs:pattern value=".{1,19}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max240">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="240" />
      <xs:pattern value=".{1,240}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max25">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="25" />
      <xs:pattern value=".{1,25}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max26">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="26" />
      <xs:pattern value=".{1,26}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max260">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="260" />
      <xs:pattern value=".{1,260}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max29">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="29" />
      <xs:pattern value=".{1,29}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max30">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="30" />
      <xs:pattern value=".{1,30}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max40">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="40" />
      <xs:pattern value=".{1,40}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max50">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="50" />
      <xs:pattern value=".{1,50}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max80">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="80" />
      <xs:pattern value=".{1,80}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CORefNumType">
    <xs:annotation>
      <xs:documentation>Customs Office Reference Number (format: an8)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="8" />
      <xs:pattern value="[a-zA-Z]{2}[a-zA-Z0-9]{6}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CountryCodeType">
    <xs:annotation>
      <xs:documentation>Country Code (format: a2)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaType">
      <xs:length value="2" />
      <xs:pattern value="[A-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DatePrepType">
    <xs:annotation>
      <xs:documentation>Date type (format YYMMDD)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="NumType">
      <xs:length value="6" />
      <xs:pattern value="[0-9]{2}(([0][1|3|5|7|8])([0][1-9]|[1-2][0-9]|[3][0-1])|([0][4|6|9])([0][1-9]|[1-2][0-9]|[3][0])|([0][2])([0][1-9]|[1-2][0-9])|([1][0|2])([0][1-9]|[1-2][0-9]|[3][0-1])|([1][1])([0][1-9]|[1-2][0-9]|[3][0]))" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DateType">
    <xs:annotation>
      <xs:documentation>Date type (format YYYYMMDD)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="NumType">
      <xs:length value="8" />
      <xs:pattern value="[1-9][0-9]{3}(([0][1|3|5|7|8])([0][1-9]|[1-2][0-9]|[3][0-1])|([0][4|6|9])([0][1-9]|[1-2][0-9]|[3][0])|([0][2])([0][1-9]|[1-2][0-9])|([1][0|2])([0][1-9]|[1-2][0-9]|[3][0-1])|([1][1])([0][1-9]|[1-2][0-9]|[3][0]))" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DayInTheMonthType">
    <xs:annotation>
      <xs:documentation>Day in the Month (format: DD)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="NumType">
      <xs:length value="2" />
      <xs:pattern value="[0][1-9]|[1-2][0-9]|[3][0-1]" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_10_2">
    <xs:restriction base="DecType">
      <xs:totalDigits value="10" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_11_2">
    <xs:restriction base="DecType">
      <xs:totalDigits value="11" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_5_2">
    <xs:restriction base="DecType">
      <xs:totalDigits value="5" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_6_5">
    <xs:restriction base="DecType">
      <xs:totalDigits value="6" />
      <xs:fractionDigits value="5" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_8_2">
    <xs:restriction base="DecType">
      <xs:totalDigits value="8" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DeclarationRequestNumberType">
    <xs:annotation>
      <xs:documentation>Declaration request number (format: an..22)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="22" />
      <xs:pattern value="[a-zA-Z]{2}.{1,20}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="LanguageCodeType">
    <xs:annotation>
      <xs:documentation>Language Code (format: a2)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaType">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="LongType">
    <xs:annotation>
      <xs:documentation>Base class for all long numeric types</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:long" />
  </xs:simpleType>
  <xs:simpleType name="LongType8">
    <xs:annotation>
      <xs:documentation>Long Numeric Type 8 (format: long8)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="LongType">
      <xs:maxInclusive value="99999999" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="MRNType">
    <xs:annotation>
      <xs:documentation>MRN (format: an..21), (alias: DocNumHEA5Type)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:pattern value="[0-9]{2}[A-Z]{2}[A-Z0-9]{13}[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="NumericMin4Max8Type">
    <xs:restriction base="NumType">
      <xs:pattern value="[0-9]{4,8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_12">
    <xs:restriction base="NumType">
      <xs:length value="12" />
      <xs:pattern value="[0-9]{12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max10">
    <xs:restriction base="NumType">
      <xs:maxLength value="10" />
      <xs:pattern value="[0-9]{1,10}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max11">
    <xs:restriction base="NumType">
      <xs:maxLength value="11" />
      <xs:pattern value="[0-9]{1,11}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max8">
    <xs:restriction base="NumType">
      <xs:maxLength value="8" />
      <xs:pattern value="[0-9]{1,8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="StringLatin1">
    <xs:restriction base="xs:string">
      <xs:pattern value="\p{IsBasicLatin}+" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TimeType">
    <xs:annotation>
      <xs:documentation>Time with precision of minute (format HHMM)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="NumType">
      <xs:length value="4" />
      <xs:pattern value="([2][0-3]|[0][0-9]|[1][0-9])([0-5][0-9])" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="emailAddressType">
    <xs:restriction base="StringLatin1">
      <xs:maxLength value="70" />
      <xs:pattern value="[^@]+@[^\.]+\..+" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

