<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://TM.nShift.messages" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://TM.nShift.messages" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="shipmentStatus">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="8" />
        <xs:enumeration value="DONE" />
        <xs:enumeration value="TRNS" />
        <xs:enumeration value="ACCEP" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="pickupDate">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="8" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="currency">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="64" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="statusPrice">
    <xs:simpleType>
      <xs:restriction base="xs:decimal">
        <xs:minInclusive value="0" />
        <xs:maxInclusive value="11" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="incoterms">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="128" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="NoPieces">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="128" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="reference">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="256" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="trackingUrl">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="2048" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="shipment">
    <xs:complexType>
      <xs:all>
        <xs:element minOccurs="0" ref="lineNo" />
        <xs:element minOccurs="0" ref="statusTimeStamp" />
        <xs:element minOccurs="0" ref="awb" />
        <xs:element minOccurs="0" ref="reference" />
        <xs:element minOccurs="0" maxOccurs="1" ref="NoPieces" />
        <xs:element minOccurs="0" ref="weight" />
        <xs:element minOccurs="0" ref="weight_uom" />
        <xs:element minOccurs="0" ref="incoterms" />
        <xs:element minOccurs="0" ref="statusPrice" />
        <xs:element minOccurs="0" ref="currency" />
        <xs:element minOccurs="0" ref="plannedDeliveryDate" />
        <xs:element minOccurs="0" ref="plannedDeliveryTimeFrom" />
        <xs:element minOccurs="0" ref="plannedDeliveryTimeTo" />
        <xs:element minOccurs="0" ref="deliveryDate" />
        <xs:element minOccurs="0" ref="deliveryTime" />
        <xs:element minOccurs="0" ref="acceptedBy" />
        <xs:element minOccurs="0" ref="pickupDate" />
        <xs:element minOccurs="0" ref="shipmentStatus" />
        <xs:element minOccurs="0" ref="carrierStatusCode" />
        <xs:element minOccurs="0" ref="carrierStatusDescription" />
        <xs:element minOccurs="0" ref="trackingUrl" />
        <xs:element minOccurs="0" ref="documents" />
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:element name="documents">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="document" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="document">
    <xs:complexType>
      <xs:all>
        <xs:element ref="documentType" />
        <xs:element ref="fileType" />
        <xs:element ref="documentData" />
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:element name="documentType">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="10" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="fileType">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="10" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="documentData" type="xs:string" />
  <xs:element name="weight_uom">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="3" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="weight">
    <xs:simpleType>
      <xs:restriction base="xs:decimal">
        <xs:minInclusive value="0" />
        <xs:maxInclusive value="11" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="statusTimeStamp" type="xs:anyType" />
  <xs:element name="statusCode">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="8" />
        <xs:enumeration value="DONE" />
        <xs:enumeration value="TRNS" />
        <xs:enumeration value="ACCEP" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="status">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="pieces" />
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="shipment" />
      </xs:sequence>
      <xs:attribute name="carrier" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:string" />
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="root">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="status" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="price">
    <xs:simpleType>
      <xs:restriction base="xs:decimal">
        <xs:minInclusive value="0" />
        <xs:maxInclusive value="11" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="plannedDeliveryDate">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="8" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="plannedDeliveryTimeTo">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="6" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="plannedDeliveryTimeFrom">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="6" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="deliveryDate">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="8" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="deliveryTime">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="6" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="pieces">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="piece" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="piece">
    <xs:complexType>
      <xs:all>
        <xs:element ref="lineNo" />
        <xs:element minOccurs="0" ref="statusTimeStamp" />
        <xs:element ref="awb" />
        <xs:element minOccurs="0" ref="weight" />
        <xs:element minOccurs="0" ref="weight_uom" />
        <xs:element minOccurs="0" ref="price" />
        <xs:element minOccurs="0" ref="plannedDeliveryDate" />
        <xs:element minOccurs="0" ref="plannedDeliveryTimeFrom" />
        <xs:element minOccurs="0" ref="plannedDeliveryTimeTo" />
        <xs:element minOccurs="0" ref="deliveryDate" />
        <xs:element minOccurs="0" ref="deliveryTime" />
        <xs:element minOccurs="0" ref="acceptedBy" />
        <xs:element minOccurs="0" ref="statusCode" />
        <xs:element minOccurs="0" ref="carrierStatusCode" />
        <xs:element minOccurs="0" ref="carrierStatusDescription" />
        <xs:element minOccurs="0" ref="documents" />
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:element name="lineNo" type="xs:int" />
  <xs:element name="carrierStatusDescription">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="128" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="carrierStatusCode">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="16" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="awb">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="256" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="acceptedBy">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:minLength value="0" />
        <xs:maxLength value="64" />
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
</xs:schema>