<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- Copyright (c) 2006 HPA (http://www.hafen-hamburg.de) -->
<!-- XSD-Version 1.0 / 9-Jul-2007 -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xsd:include schemaLocation="http://www.dakosy.de/fileadmin/user_upload/Handbuch/Verkehrstraeger/TD04_5/Nachrichten/MessageEnvelope.xsd"/>
	<xsd:include schemaLocation="http://www.dakosy.de/fileadmin/user_upload/Handbuch/Verkehrstraeger/TD04_5/Nachrichten/TD04_core_Subj.xsd"/>
	<xsd:element name="Document">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Metainfo" type="MetaInfoDef">
					<xsd:annotation>
						<xsd:documentation>In the TD04 interface only one recipient is used, i.e. only 2 or 3 participants can be specified for a transmission.</xsd:documentation>
						<xsd:documentation>The attribute Alias="HPA" is used for the participant code.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Messages">
					<xsd:complexType>
						<xsd:sequence maxOccurs="unbounded">
							<xsd:element name="Message" type="MessageDef"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="MessageDef">
		<xsd:annotation>
			<xsd:documentation>General Message definition</xsd:documentation>
			<xsd:documentation>Describes the contents of a message (metainfo and data)</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="MessageMetaInfo" type="MessageMetaInfoDef" minOccurs="0"/>
			<xsd:element name="CustomsInfo" type="CustomsInfoDef"/>
		</xsd:sequence>
		<xsd:attribute name="ReferenceNumber" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="EN">unique reference number identifying a single message</xsd:documentation>
				<xsd:documentation xml:lang="DE">Nachrichten-Referenz</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:minLength value="1"/>
					<xsd:maxLength value="35"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="Status" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation xml:lang="EN">not used for TD04</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="CustomsInfoDef">
		<xsd:sequence>
			<xsd:element name="BusinessDocumentDetail" type="BusinessDocumentDef"/>
			<xsd:element name="ShippingUnit" maxOccurs="999">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Position">
							<xsd:simpleType>
								<xsd:annotation>
									<xsd:documentation>Position of the unit as transmitted by the customer in the transport order unit segment. Unique number within the transport order.</xsd:documentation>
									<xsd:documentation>The position is used to unambigously identify the shipping unit in the communication.</xsd:documentation>
									<xsd:documentation xml:lang="DE">Position der Ladeeinheit im Transportauftrag. Eindeutige Nummer innerhalb des Transportauftrags.</xsd:documentation>
									<xsd:documentation>Die Positionsnummer wird in der Kommunikation benutzt zur eindeutigen Identifizierung der Ladeeinheit.</xsd:documentation>
								</xsd:annotation>
								<xsd:restriction base="xsd:positiveInteger">
									<xsd:maxInclusive value="999"/>
								</xsd:restriction>
							</xsd:simpleType>
						</xsd:element>
						<xsd:element name="HANumber" type="HABISNumberDef" minOccurs="0"/>
						<xsd:element name="CustomsProcedure">
							<xsd:simpleType>
								<xsd:annotation>
									<xsd:documentation>according to HABIS code list A65</xsd:documentation>
									<xsd:documentation xml:lang="DE">lt. SVZ A65</xsd:documentation>
								</xsd:annotation>
								<xsd:restriction base="xsd:string">
									<xsd:maxLength value="2"/>
								</xsd:restriction>
							</xsd:simpleType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
