<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.00">
  <!--=========================================-->
  <!--===== Interdomain Simple Types -->
  <!--===== DDNIA v4.00  -->
  <!--===== QTM942  -->
  <!--===== Included Features: [10, 12, 18, 20, 26, 27, 28, 29]  -->
  <!--=========================================-->
  <!--===== Includes =====-->
  <xs:include schemaLocation="doc.xsd" />
  <!--===== Data Item Types =====-->
  <xs:simpleType name="AlphaNumType">
    <xs:annotation>
      <xs:documentation>Base class for all anN and an..N types</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token" />
  </xs:simpleType>
  <xs:simpleType name="AlphaType">
    <xs:annotation>
      <xs:documentation>Base class for all aN and a..N types</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token" />
  </xs:simpleType>
  <xs:simpleType name="Alpha_1">
    <xs:restriction base="AlphaType">
      <xs:length value="1" />
      <xs:pattern value="[a-zA-Z]" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alpha_2">
    <xs:restriction base="AlphaType">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alpha_3">
    <xs:restriction base="AlphaType">
      <xs:length value="3" />
      <xs:pattern value="[a-zA-Z]{3}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alpha_Max29">
    <xs:restriction base="AlphaType">
      <xs:maxLength value="29" />
      <xs:pattern value="[a-zA-Z]{1,29}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alpha_Max8">
    <xs:restriction base="AlphaType">
      <xs:maxLength value="8" />
      <xs:pattern value="[a-zA-Z]{1,8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_1">
    <xs:restriction base="AlphaNumType">
      <xs:length value="1" />
      <xs:pattern value=".{1}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_2">
    <xs:restriction base="AlphaNumType">
      <xs:length value="2" />
      <xs:pattern value=".{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_3">
    <xs:restriction base="AlphaNumType">
      <xs:length value="3" />
      <xs:pattern value=".{3}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_4">
    <xs:restriction base="AlphaNumType">
      <xs:length value="4" />
      <xs:pattern value=".{4}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_8">
    <xs:restriction base="AlphaNumType">
      <xs:length value="8" />
      <xs:pattern value=".{8}" />
    </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_Max12">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="12" />
      <xs:pattern value=".{1,12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max14">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="14" />
      <xs:pattern value=".{1,14}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max140">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="140" />
      <xs:pattern value=".{1,140}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max17">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="17" />
      <xs:pattern value=".{1,17}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max175">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="175" />
      <xs:pattern value=".{1,175}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max2">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="2" />
      <xs:pattern value=".{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max20">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="20" />
      <xs:pattern value=".{1,20}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max210">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="210" />
      <xs:pattern value=".{1,210}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max22">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="22" />
      <xs:pattern value=".{1,22}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max24">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="24" />
      <xs:pattern value=".{1,24}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max27">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="27" />
      <xs:pattern value=".{1,27}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max280">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="280" />
      <xs:pattern value=".{1,280}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max3">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="3" />
      <xs:pattern value=".{1,3}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max35">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max350">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="350" />
      <xs:pattern value=".{1,350}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max4">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="4" />
      <xs:pattern value=".{1,4}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max42">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="42" />
      <xs:pattern value=".{1,42}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max5">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="5" />
      <xs:pattern value=".{1,5}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max6">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="6" />
      <xs:pattern value=".{1,6}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max70">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="70" />
      <xs:pattern value=".{1,70}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max8">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="8" />
      <xs:pattern value=".{1,8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max9">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="9" />
      <xs:pattern value=".{1,9}" />
    </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-Z]{2}[a-zA-Z0-9]{6}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CityType">
    <xs:annotation>
      <xs:documentation>Trader City (format: an..35)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CountryCodeType">
    <xs:annotation>
      <xs:documentation>Country Code (format: an2)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DateTimeType">
    <xs:annotation>
      <xs:documentation>Date and Time with precision of minute (format YYYYMMDDHHMM)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="12" />
      <xs:pattern value="[1-9][0-9][0-9][0-9](([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]))(([2][0-3]|[0][0-9]|[1][0-9])([0-5][0-9]))" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DateType">
    <xs:annotation>
      <xs:documentation>Date and Time with precision of minute (format YYYYMMDD)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="8" />
      <xs:pattern value="[0-9]{8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DecType">
    <xs:annotation>
      <xs:documentation>Base class for all n..N,M types</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal" />
  </xs:simpleType>
  <xs:simpleType name="Decimal_11_3">
    <xs:restriction base="DecType">
      <xs:totalDigits value="11" />
      <xs:fractionDigits value="3" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_15_2">
    <xs:restriction base="DecType">
      <xs:totalDigits value="15" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_8_6">
    <xs:restriction base="DecType">
      <xs:totalDigits value="8" />
      <xs:fractionDigits value="6" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="LanguageCodeType">
    <xs:annotation>
      <xs:documentation>Language Code (format: an2)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </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-zA-Z0-9]{1,16}[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="NumType">
    <xs:annotation>
      <xs:documentation>Base class for all nN and n..N types</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token" />
  </xs:simpleType>
  <xs:simpleType name="Numeric_1">
    <xs:restriction base="NumType">
      <xs:length value="1" />
      <xs:pattern value="[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_2">
    <xs:restriction base="NumType">
      <xs:length value="2" />
      <xs:pattern value="[0-9]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_3">
    <xs:restriction base="NumType">
      <xs:length value="3" />
      <xs:pattern value="[0-9]{3}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_4">
    <xs:restriction base="NumType">
      <xs:length value="4" />
      <xs:pattern value="[0-9]{4}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_6">
    <xs:restriction base="NumType">
      <xs:length value="6" />
      <xs:pattern value="[0-9]{6}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_8">
    <xs:restriction base="NumType">
      <xs:length value="8" />
      <xs:pattern value="[0-9]{8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max2">
    <xs:restriction base="NumType">
      <xs:maxLength value="2" />
      <xs:pattern value="[0-9]{1,2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max3">
    <xs:restriction base="NumType">
      <xs:maxLength value="3" />
      <xs:pattern value="[0-9]{1,3}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max4">
    <xs:restriction base="NumType">
      <xs:maxLength value="4" />
      <xs:pattern value="[0-9]{1,4}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max5">
    <xs:restriction base="NumType">
      <xs:maxLength value="5" />
      <xs:pattern value="[0-9]{1,5}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max6">
    <xs:restriction base="NumType">
      <xs:maxLength value="6" />
      <xs:pattern value="[0-9]{1,6}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max7">
    <xs:restriction base="NumType">
      <xs:maxLength value="7" />
      <xs:pattern value="[0-9]{1,7}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PostalCodeType">
    <xs:annotation>
      <xs:documentation>Trader Postal Code (format: n..9)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="9" />
      <xs:pattern value=".{1,9}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="StreetNumType">
    <xs:annotation>
      <xs:documentation>Trader Street and Number (format: an..35)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </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="TINType">
    <xs:annotation>
      <xs:documentation>Trader Identification Number (format: an..17)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="StringLatin1">
      <xs:minLength value="3" />
      <xs:maxLength value="17" />
      <xs:pattern value="[A-Z]{2}[^\n\r]*" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TradNameType">
    <xs:annotation>
      <xs:documentation>Trader Name (format: an..35)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="35" />
      <xs:pattern value=".{1,35}" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

