<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->

<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->

<!--    *****     Update Log     *****
 
Date           By      Note
08 Feb 2014		LA		New noun - shippers export declaration 
        *****     Update End     *****
 
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schema.infor.com/InforOAGIS/2"
	targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
	attributeFormDefault="unqualified">

	<xsd:include schemaLocation="../Components/Operational/LogisticsComponents.xsd"/>
	<xsd:element name="ShippersExportDeclaration" type="ShippersExportDeclarationType">
		<xsd:annotation>
			<xsd:documentation source="http://www.openapplications.org/oagis/9">A
				ShippersExportDeclaration document identifies and describes a specific collection of
				goods to be exported, and to be declared to customs officicials. 
				There could be multiple end users/customers for a declaration. The noun could be used 
				in the following cases - 
				* sale of goods
				* outward processing
				* re-export in case of customs warehousing, inward processing
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ShippersExportDeclarationHeader" type="ShippersExportDeclarationHeaderType">
		<xsd:annotation>
			<xsd:documentation source="http://www.openapplications.org/oagis/9">Provides general
				information about the declaration to customs office including declarant, representative
				details, export office, exit office details, and all the containers that are
				part of the current declaration.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ShippersExportDeclarationItem" type="ShippersExportDeclarationItemType">
		<xsd:annotation>
			<xsd:documentation>Provides general
				information about individual containers being delivered, to an end user as part
				of the export process. The commodity information is also included. </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ShippersExportDeclarationResponse"
		type="ShippersExportDeclarationResponseType"/>
	<xsd:complexType name="ShippersExportDeclarationType">
		<xsd:sequence>
			<xsd:element ref="ShippersExportDeclarationHeader" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation> Provides general
						information about the declaration to customs office including declarant, representative
						details, export office, exit office details, and all the containers that are
						part of the current declaration.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ShippersExportDeclarationItem" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> Provides general
						information about individual containers being delivered, to an end user as part
						of the export process. The commodity information is also included. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ShippersExportDeclarationResponse" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Provides the details regarding the responses received from customs office
						for the declarations sent.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="ShippersExportDeclarationHeaderType">
		<xsd:complexContent>
			<xsd:extension base="ExportDeclarationHeaderBaseType">
				<xsd:sequence>

					<xsd:element ref="Type" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">Indicates the type of the object in which
								assoicated.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="Event" minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation source="http://www.openapplications.org/oagis/9"/>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="UserArea" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">Allows the user of OAGIS to extend the specification in order to
								provide additional information that is not captured in
								OAGIS.</xsd:documentation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">This is done by defining the additional information in XML Schema
								and referencing the new schema in the xml instance document through
								the use of namespaces. Once this is done the additional information
								defined there can be carried in the BOD XML instance
								document.</xsd:documentation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">The Open Applications Group will make best efforts to quickly
								consider all proposed submissions.The USERAREA is always the last
								element in all components, except where the component has been
								extended inline.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ShippersExportDeclarationItemType">
		<xsd:complexContent>
			<xsd:extension base="ExportDeclarationItemBaseType">
				<xsd:sequence>
					<xsd:element ref="ContainsHazardousMaterialIndicator" minOccurs="0"/>
					<xsd:element ref="HazardousMaterialCode" minOccurs="0"/>

					<xsd:element ref="CustomsProcedureCode" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								Indicates the customs procedure for which the goods would be subjected to.
								The details would be from a standard code list. 
								Some examples of the code values are "Temporary export for return in the unaltered state.",
								"Export of compensating products obtained from equivalent goods under the inward
								processing procedure (suspension system) before entering import goods for the
								procedure." etc.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="CustomsWarehousing" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								In some cases, the export process is originated using goods stored in a customs warehouse. 
								This then ends the state "stored in customs warehouse" for these goods.
								
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>

					<xsd:element ref="InwardProcessing" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								Needed when the supplier/declarant is a subcontractor for goods; used when sending back 
								or repaired goods (opposite of outwardprocessing)
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>

					<xsd:element ref="ProducedDocument" minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								To specify additional details like - 
								- a reference to any related document
								- an information needed by customs for example for dual use goods
								- an approval number or another available authorization to ship this goods to the planned destination, for example centrifuges to Iran for use in a bakery
								
								These are the documents that are produced along with the declaration. Along with documents, these
								could also contain any certificated that have to be attached to the declaration
								
								Box 44 in EU SAD
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="PriorAdministrativeDocument" minOccurs="0"
						maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								To specify Customs administrative reference of a previous process 
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>

					<xsd:element ref="ResponsePosition" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								Contains the position specific details of customs response.
								This element must not be sent for any message that the declarant sends
								to customs office - it must be used only for the relevant response messages
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>

					<xsd:element ref="UserArea" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">Allows the user of OAGIS to extend the specification in order to
								provide additional information that is not captured in
								OAGIS.</xsd:documentation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">This is done by defining the additional information in XML Schema
								and referencing the new schema in the xml instance document through
								the use of namespaces. Once this is done the additional information
								defined there can be carried in the BOD XML instance
								document.</xsd:documentation>
							<xsd:documentation source="http://www.openapplications.org/platform/1">The Open Applications Group will make best efforts to quickly
								consider all proposed submissions.The USERAREA is always the last
								element in all components, except where the component has been
								extended inline.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="CustomsProcedureCode" type="CodeType"/>

	<xsd:complexType name="ShippersExportDeclarationResponseType">
		<xsd:sequence>
			<xsd:element ref="CustomsStatus" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Status as set by the customs office for the current declaration.
						This is a standard code list
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ReceivedDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which the declaration is received (after lodging/submitting).
						This could either be the date of receiving the full declaration or 
						the simplified declaration (in which case a supplementary declaration is
						submitted later). The simplified declaration is called as 'Pre Shipment Advice' in some EU countries
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="AcceptedDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which declaration is accepted by cutoms after initial verification
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="RejectedDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which the declaration is rejected.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="PlannedCheckDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Goods could be inspected at this time and at the location of the goods;
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="InspectionTypeCode" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						specifies the type of inspection measure, for example:
						- B: Inspection
						- D: Presentation of Documents
						- R: X-ray
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="CanceledDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which declaration was canceled
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="ReleaseDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which goods are released for export. 
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="PackingAndLoadingTimePeriod" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						To specify the starting and ending times for packing and loading
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="FollowUpDate" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which the follow up request is sent - 
						The follow up request is sent when the export office does not receive
						exit confirmation from the office of exit
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="FollowUpReplyRequiredDate" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The dead line by which the reply for the follow up has to be sent
						by the declarant
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ActualExitDate" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Actual date of exit from office of exit
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ActualExitOffice" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Actual office of exit
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ProofOfExitNote" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This element is given by Customs as the Proof of Exit, 
						some special information related to the procedure is added as Watermark to the PDF 
						and also transferred in this element of the message.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="QuantityDifferenceIndicator" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This element indicates, that a Proof of Exit with a different quantity from the current 
						declaration exists 
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="AlternativeProofIndicator" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This element indicates that an alternative proof was presented to indicate completion of this export process.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="SupplementRequestedDate" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which request is sent for submitting the supplementary declaration.
						Supplementary declaration is required when a full declaration is not made and only
						a simplified declaration (or a pre-shipment advice) is submitted with the start of the
						export process
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="SupplementRequiredDate" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date by which supplementary declaration msut be submitted
						by the declarant
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="CompletionDateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Date on which the export process is 'completed' - ?
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="Text" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						Provision to specify any text that comes with the response
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="Error" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						To specify any errors to be conveyed along with the customs response
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="AcceptedDateTime" type="DateTimeType"/>
	<xsd:element name="CanceledDateTime" type="DateTimeType"/>
	<xsd:element name="FollowUpDate" type="DateType"/>
	<xsd:element name="FollowUpReplyRequiredDate" type="DateType"/>
	<xsd:element name="PackingAndLoadingTimePeriod" type="TimePeriodType"/>
	<xsd:element name="SupplementRequestedDate" type="DateType"/>
	<xsd:element name="SupplementRequiredDate" type="DateType"/>
	<xsd:element name="CustomsStatus" type="CodeType"/>
	<xsd:element name="Error" type="ErrorType"/>

	<xsd:complexType name="ResponsePositionType">
		<xsd:sequence>
			<xsd:element ref="OriginalLineNumber" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Indicates the original line number of the current line for a customs response.
						In some cases, customs office removes a declaration line (for example in cases where
						it is not possible to find the corresponding goods - then in the EDI message, the line 
						numbers are just incremented from a starting line number. The original line number
						indicates the actual line number in the submitted declaration before any lines were removed
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="InspectionTypeCode" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						specifies the type of inspection measure, for example:
						- B: Inspection
						- D: Presentation of Documents
						- R: X-ray
						When it is different for a specific position, it is specified here
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<xsd:element ref="ProofOfExitNote" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						If a different proof of exit exists for the position, that is specified here
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="ResponsePosition" type="ResponsePositionType"/>
</xsd:schema>
