<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
     targetNamespace="http://www.netchb.com/xml/isf"
     xmlns:isf="http://www.netchb.com/xml/isf"
	 xmlns:data="http://www.netchb.com/xml/data"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified">
	<xsd:annotation>
		<xsd:documentation>
			This is the XML Schema for an ISF XML document that will be used
			to validate any ISF submitted to NetChb using the ISF web service
		</xsd:documentation>
	</xsd:annotation>
	<xsd:import namespace="http://www.netchb.com/xml/data" schemaLocation="https://www.netchb.com/xml/data/data_type.xsd" />
	
	<!-- **************************************************************** -->
	<xsd:element name="isf">
		<xsd:annotation>
			<xsd:documentation>
				isf is the root element of the document.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:all>
				<xsd:element name="transmit" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							transmit is an optional tag.  If included, the system will transmit this ISF to
							U.S. Customs once it has been uploaded to this system.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<xsd:element name="assign-to" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This is the username of the user who this entry should be assigned to.
							This tag is optional.  If this tag is omitted, the entry will be assigned to
							the user whose username and password is submitted as the security credentials
							for the uploadIsf/amendIsf operations on this web service
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:maxLength value="20"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="reference-number" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This is a number that you can include to uniquely identify this ISF.  This tag is optional.
							If not included, the system will generate one for you.
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:maxLength value="100"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="isf-type" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
							isf-type must be either 5 or 10. 
							This is the old ISF type tag, which has been deprecated but remains for backwards compatibility.
							It is recommended to use the <isf-submission-type> tag instead.
							This tag is optional if <isf-submission-type> is used.
							]]>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:enumeration value="5"/>
							<xsd:enumeration value="10"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				
				<xsd:element name="isf-submission-type" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
							It is recommended to use this tag to input the ISF type over the 
							older <isf-type> tag, which is now deprecated.  This tag is optional if <isf-type> is used.
							
							isf-submission-type must be either 1-6.  		
							1 - Importer Security Filing 10 (ISF-10) submission
							2 - Importer Security Filing 5 (ISF-5) submission
							3 - ISF-5 submission type is being changed to an ISF-10
							4 - ISF-10 submission type is being changed to an ISF-5
							5 - Late ISF-10 submitted without a bond
							6 - Late ISF-5 submitted without a bond
							]]>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:enumeration value="1"/>
							<xsd:enumeration value="2"/>
							<xsd:enumeration value="3"/>
							<xsd:enumeration value="4"/>
							<xsd:enumeration value="5"/>
							<xsd:enumeration value="6"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="shipment-type" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							shipment-type must be included if isf-type is 10.
							01 = Standard or regular filings
							02 = To Order Shipments
							03 = Household Goods / Personal Effects (HHG / PE)
							04 = Military, Government
							05 = Diplomatic Shipment
							06 = Carnet
							07 = US Return Goods
							08 = FTZ Shipments
							09 = International Mail Shipments
							10 = Outer Continental Shelf Shipments
							11 = Informal
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:enumeration value="01"/>
							<xsd:enumeration value="02"/>
							<xsd:enumeration value="03"/>
							<xsd:enumeration value="04"/>
							<xsd:enumeration value="05"/>
							<xsd:enumeration value="06"/>
							<xsd:enumeration value="07"/>
							<xsd:enumeration value="08"/>
							<xsd:enumeration value="09"/>
							<xsd:enumeration value="10"/>
							<xsd:enumeration value="11"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="transaction-type">
					<xsd:annotation>
						<xsd:documentation>
							transaction-type must be:
							CT - Compliant Transaction
							FR - Flexible Range
							FT - Flexible Timing
							FX - Flexible Range and Timing
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:enumeration value="CT"/>
							<xsd:enumeration value="FR"/>
							<xsd:enumeration value="FT"/>
							<xsd:enumeration value="FX"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="customer-reference-number" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This tag contains the customer reference number.  It is optional.
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:maxLength value="100"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="importer">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
							The importer tag has a choice of 2 sub-elements: tax-id or passport.
							tax-id must conform to the data:taxIdType.  passport is itself a complex type
							that must contain passport-number, date-of-birth, and issuing-country.
							If ISF Importer Number Qualifier = 'AEF' (Passport Number) or '34' (SSN), the
							<date-of-birth> and <name> tags should also be populated.
							]]>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:choice>
								<xsd:element name="tax-id" type="data:taxIdType" />
								<xsd:element name="passport" type="isf:passportType"/>
							</xsd:choice>
							<xsd:element name="date-of-birth" type="xsd:date" minOccurs="0"/>
							<xsd:element name="name" minOccurs="0">
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:maxLength value="50"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>

				<xsd:element name="freight-forwarder-id" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
							Use the Identifier found above Profile Name on the Freight Forwarder Information page.
							]]>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:integer">
							<xsd:minInclusive value="0"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="mode-of-transport">
					<xsd:annotation>
						<xsd:documentation>
							mode-of-transport must contain a single sub-element, either
							containerized or non-containerized
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:choice>
							<xsd:element name="containerized"/>
							<xsd:element name="non-containerized"/>
						</xsd:choice>
					</xsd:complexType>
				</xsd:element>

				<xsd:element name="carrier" type="data:carrierCodeType" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This should be the 4 character SCAC code of the carrier
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<xsd:element name="bond-information">
					<xsd:annotation>
						<xsd:documentation>
							This contains all of the bond information pertaining to this ISF
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:all>
							<xsd:element name="bond-holder">
								<xsd:complexType>
									<xsd:choice>
										<xsd:element name="broker"/>
										<xsd:element name="importer"/>
										<xsd:element name="custodian-of-merchandise"/>
										<xsd:element name="carrier"/>
										<xsd:element name="ftz-operator"/>
										<xsd:element name="isf-bond"/>
									</xsd:choice>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="bond-holder-id" type="data:taxIdType" minOccurs="0"/>
							<xsd:element name="bond-type" minOccurs="0">
								<xsd:complexType>
									<xsd:choice>
										<xsd:element name="continuous"/>
										<xsd:element name="single-transaction"/>
									</xsd:choice>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="surety-code" type="data:suretyCodeType" minOccurs="0">
								<xsd:annotation>
									<xsd:documentation>
										This should be included if the bond-category is isf-bond
										and the bond-type is single-transaction
									</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="bond-reference-number" minOccurs="0">
								<xsd:annotation>
									<xsd:documentation>
										This should be included if the bond holder is isf-bond and the bond-type is single-transaction
									</xsd:documentation>
								</xsd:annotation>
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:maxLength value="50"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
						</xsd:all>
					</xsd:complexType>
				</xsd:element>

				<xsd:element name="master-scac" type="data:carrierCodeType" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This should be the 4 character SCAC code of issuer of the master bill.
							This tag is optional
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<xsd:element name="master-bill" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This tag contains the master bill number.  This tag is optional
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:token">
							<xsd:maxLength value="50"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

				<xsd:element name="cbp-entry-number" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This tag contains the cbp entry number.  It is optional
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:all>
							<xsd:element name="filer-code" type="data:filerCodeType"/>
							<xsd:element name="entry-number" type="data:entryNoType"/>
							<xsd:element name="check-sum">
								<xsd:simpleType>
									<xsd:restriction base="xsd:integer">
										<xsd:minInclusive value="0"/>
										<xsd:maxInclusive value="9"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
						</xsd:all>
					</xsd:complexType>
				</xsd:element>

				<xsd:element name="port-of-unlading" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This tag should only be included if the isf-type is 5
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:all>
							<xsd:element name="port-code">
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:maxLength value="15"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="port-code-type">
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:enumeration value="K"/>
										<xsd:enumeration value="UN"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
						</xsd:all>
					</xsd:complexType>
				</xsd:element>

				<xsd:element name="place-of-delivery" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							This tag should only be included if the isf-type is 5
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:all>
							<xsd:element name="location">
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:maxLength value="15"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="location-code">
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:enumeration value="K"/>
										<xsd:enumeration value="UN"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
						</xsd:all>
					</xsd:complexType>
				</xsd:element>
				
				<xsd:element name="estimated-departure-date" type="xsd:date" minOccurs="0"/>
				<xsd:element name="estimated-arrival-date" type="xsd:date" minOccurs="0"/>
				
				<xsd:element name="informal-shipment-information" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							If the Shipment Type is 11 (Informal), then the following data fields are required:
							1. Shipment Sub-Type 
							2. Estimated Value
							3. Estimated Quantity
							4. Unit of Measure
							5. Estimated Weight
							6. Weight Qualifier
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="shipment-sub-type">
								<xsd:annotation>
									<xsd:documentation>
										01 - Section 321 Shipments; see 19 USC § 1321
										02 - Informal Shipments; see 19 CFR § 143.21
										03 - General Note 3(e) Shipments
									</xsd:documentation>
								</xsd:annotation>
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:enumeration value="01"/>
										<xsd:enumeration value="02"/>
										<xsd:enumeration value="03"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="estimated-value">
								<xsd:simpleType>
									<xsd:restriction base="xsd:long">
										<xsd:totalDigits value="11"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="estimated-quantity">
								<xsd:simpleType>
									<xsd:restriction base="xsd:long">
										<xsd:totalDigits value="11"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="unit-of-measure" type="data:unitOfMeasureType" />
							<xsd:element name="estimated-weight">
								<xsd:simpleType>
									<xsd:restriction base="xsd:long">
										<xsd:totalDigits value="11"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="weight-qualifier">
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:enumeration value="K"/>
										<xsd:enumeration value="L"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
				
				<xsd:element name="bills-of-lading">
					<xsd:annotation>
						<xsd:documentation>
							At least 1 bill of lading is required
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="bill-of-lading" type="isf:billOfLadingType" minOccurs="1" maxOccurs="999"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>

				<xsd:element name="containers" minOccurs="0">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="container" type="isf:containerType" minOccurs="0" maxOccurs="999"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
				
				<xsd:element name="entities">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="entity" type="isf:entityType" minOccurs="0" maxOccurs="999"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
				
				<xsd:element name="product-information" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							product-information should be included if the ISF type is 5
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="product" type="isf:productType" minOccurs="0" maxOccurs="999"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:all>
		</xsd:complexType>
	</xsd:element>
	
	<!-- **************************************************************** -->
	<xsd:complexType name="billOfLadingType">
		<xsd:all>
			<xsd:element name="bill-type">
				<xsd:annotation>
					<xsd:documentation>
						BM should be used for House bills.  OB should be used for Regular Bills or Straight Bills.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:enumeration value="BM"/>
						<xsd:enumeration value="OB"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="issuer-scac" type="data:carrierCodeType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This should be the 4 character scac code of the issuer of the house bill
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="bill-number">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="50"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:all>
	</xsd:complexType>
	
	<!-- **************************************************************** -->
	<xsd:complexType name="containerType">
		<xsd:all>
			<xsd:element name="description-code">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:enumeration value="20"/>
						<xsd:enumeration value="2B"/>
						<xsd:enumeration value="2D"/>
						<xsd:enumeration value="2E"/>
						<xsd:enumeration value="2F"/>
						<xsd:enumeration value="40"/>
						<xsd:enumeration value="4B"/>
						<xsd:enumeration value="AC"/>
						<xsd:enumeration value="AF"/>
						<xsd:enumeration value="AL"/>
						<xsd:enumeration value="AP"/>
						<xsd:enumeration value="AT"/>
						<xsd:enumeration value="BC"/>
						<xsd:enumeration value="BE"/>
						<xsd:enumeration value="BF"/>
						<xsd:enumeration value="BG"/>
						<xsd:enumeration value="BH"/>
						<xsd:enumeration value="BJ"/>
						<xsd:enumeration value="BK"/>
						<xsd:enumeration value="BO"/>
						<xsd:enumeration value="BR"/>
						<xsd:enumeration value="BX"/>
						<xsd:enumeration value="CA"/>
						<xsd:enumeration value="CB"/>
						<xsd:enumeration value="CC"/>
						<xsd:enumeration value="CD"/>
						<xsd:enumeration value="CG"/>
						<xsd:enumeration value="CH"/>
						<xsd:enumeration value="CI"/>
						<xsd:enumeration value="CJ"/>
						<xsd:enumeration value="CK"/>
						<xsd:enumeration value="CL"/>
						<xsd:enumeration value="CM"/>
						<xsd:enumeration value="CN"/>
						<xsd:enumeration value="CP"/>
						<xsd:enumeration value="CQ"/>
						<xsd:enumeration value="CR"/>
						<xsd:enumeration value="CS"/>
						<xsd:enumeration value="CT"/>
						<xsd:enumeration value="CU"/>
						<xsd:enumeration value="CV"/>
						<xsd:enumeration value="CW"/>
						<xsd:enumeration value="CX"/>
						<xsd:enumeration value="CZ"/>
						<xsd:enumeration value="DD"/>
						<xsd:enumeration value="DF"/>
						<xsd:enumeration value="DT"/>
						<xsd:enumeration value="DX"/>
						<xsd:enumeration value="ET"/>
						<xsd:enumeration value="FH"/>
						<xsd:enumeration value="FN"/>
						<xsd:enumeration value="FP"/>
						<xsd:enumeration value="FR"/>
						<xsd:enumeration value="FS"/>
						<xsd:enumeration value="FT"/>
						<xsd:enumeration value="FX"/>
						<xsd:enumeration value="GS"/>
						<xsd:enumeration value="HB"/>
						<xsd:enumeration value="HC"/>
						<xsd:enumeration value="HO"/>
						<xsd:enumeration value="HP"/>
						<xsd:enumeration value="HT"/>
						<xsd:enumeration value="HV"/>
						<xsd:enumeration value="HY"/>
						<xsd:enumeration value="ID"/>
						<xsd:enumeration value="IX"/>
						<xsd:enumeration value="LO"/>
						<xsd:enumeration value="LS"/>
						<xsd:enumeration value="LU"/>
						<xsd:enumeration value="NC"/>
						<xsd:enumeration value="NX"/>
						<xsd:enumeration value="OB"/>
						<xsd:enumeration value="OT"/>
						<xsd:enumeration value="OV"/>
						<xsd:enumeration value="PL"/>
						<xsd:enumeration value="PP"/>
						<xsd:enumeration value="PT"/>
						<xsd:enumeration value="PU"/>
						<xsd:enumeration value="RA"/>
						<xsd:enumeration value="RC"/>
						<xsd:enumeration value="RD"/>
						<xsd:enumeration value="RE"/>
						<xsd:enumeration value="RF"/>
						<xsd:enumeration value="RG"/>
						<xsd:enumeration value="RI"/>
						<xsd:enumeration value="RO"/>
						<xsd:enumeration value="RR"/>
						<xsd:enumeration value="RS"/>
						<xsd:enumeration value="RT"/>
						<xsd:enumeration value="SA"/>
						<xsd:enumeration value="SC"/>
						<xsd:enumeration value="SD"/>
						<xsd:enumeration value="SK"/>
						<xsd:enumeration value="SL"/>
						<xsd:enumeration value="SR"/>
						<xsd:enumeration value="SS"/>
						<xsd:enumeration value="ST"/>
						<xsd:enumeration value="SV"/>
						<xsd:enumeration value="TA"/>
						<xsd:enumeration value="TB"/>
						<xsd:enumeration value="TC"/>
						<xsd:enumeration value="TF"/>
						<xsd:enumeration value="TG"/>
						<xsd:enumeration value="TH"/>
						<xsd:enumeration value="TI"/>
						<xsd:enumeration value="TJ"/>
						<xsd:enumeration value="TK"/>
						<xsd:enumeration value="TL"/>
						<xsd:enumeration value="TM"/>
						<xsd:enumeration value="TN"/>
						<xsd:enumeration value="TO"/>
						<xsd:enumeration value="TP"/>
						<xsd:enumeration value="TQ"/>
						<xsd:enumeration value="TR"/>
						<xsd:enumeration value="TT"/>
						<xsd:enumeration value="TU"/>
						<xsd:enumeration value="TV"/>
						<xsd:enumeration value="TW"/>
						<xsd:enumeration value="UA"/>
						<xsd:enumeration value="UB"/>
						<xsd:enumeration value="UC"/>
						<xsd:enumeration value="UD"/>
						<xsd:enumeration value="UE"/>
						<xsd:enumeration value="UL"/>
						<xsd:enumeration value="UP"/>
						<xsd:enumeration value="VA"/>
						<xsd:enumeration value="VE"/>
						<xsd:enumeration value="VL"/>
						<xsd:enumeration value="VR"/>
						<xsd:enumeration value="VS"/>
						<xsd:enumeration value="VT"/>
						<xsd:enumeration value="WR"/>
						<xsd:enumeration value="WY"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="equipment-initial">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="4"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="equipment-number">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="15"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="check-digit" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:integer">
						<xsd:minInclusive value="0"/>
						<xsd:maxInclusive value="9"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="size-type-code">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="4"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:all>
	</xsd:complexType>

	<!-- **************************************************************** -->
	<xsd:complexType name="entityType">
		<xsd:all>
			<xsd:element name="entity-code">
				<xsd:annotation>
					<xsd:documentation>
						MF	Manufacturer/Supplier
						SE	Selling Party
						BY	Buying Party
						ST	Ship To Party
						LG	Scheduled Container Stuffing Location
						CS	Consolidator
						BKP	Booking Party (FROB, TE, IE)
						CN	Consignee
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:enumeration value="MF"/>
						<xsd:enumeration value="SE"/>
						<xsd:enumeration value="BY"/>
						<xsd:enumeration value="ST"/>
						<xsd:enumeration value="LG"/>
						<xsd:enumeration value="CS"/>
						<xsd:enumeration value="BKP"/>
						<xsd:enumeration value="CN"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="mid" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This can only be entered if entity-code is MF or SE
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="15"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="entity-name" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This can only be optional if entity-code is SE or MF and an mid is entered.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="35"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="entity-information" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						entity-information should contain either an entity-id tag or
						an entity-address tag.  If the entity-code is CN, then the entity-information tag
						must contain the entity-id tag.
						This can only be optional if entity-code is SE or MF and an mid is entered.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:choice>
							<xsd:element name="entity-id">
								<xsd:annotation>
									<xsd:documentation>
										entity-id must be a DUNS/DUNS+4 number if the entity-code is not CN.
										If the entity-code is ST, the FIRMS code is also accepted.
										If the entity-code is CN, the entity-id must be a tax-id.
										If the tax-id is entered for the entity-id, the date-of-birth should also be entered.
									</xsd:documentation>
								</xsd:annotation>
								<xsd:simpleType>
									<xsd:restriction base="xsd:token">
										<xsd:pattern value="\d{2}-\d{7}[\dA-Za-z]?[\dA-Za-z]?|\d{6}-\d{5}|\d{3}-\d{2}-\d{4}|\d{9}(\d{4})?|[A-Za-z]\d{3}"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:element>
							<xsd:element name="passport" type="isf:passportType">
								<xsd:annotation>
									<xsd:documentation>
										passport can only be used if the entity type is CN and the shipment-type is 03
									</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="entity-address" type="isf:entityAddressType"/>
						</xsd:choice>
						<xsd:element name="date-of-birth" type="xsd:date" minOccurs="0"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="product-information" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						product-information should be included if the entity-code is MF (Manufacturer)
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="product" type="isf:productType" minOccurs="0" maxOccurs="999"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="email-address" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						This is the email address of the entity.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="250"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="email-isf" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						If you wish to include this entity in the list of parties that receive a printout of the
						ISF, this tag should be included
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="email-status-updates" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						If you would like this entity to receive Customs generated status updates via email,
						this tag should be included
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:all>
	</xsd:complexType>

	<!-- **************************************************************** -->
	<xsd:complexType name="entityAddressType">
		<xsd:all>
			<xsd:element name="secondary-name" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="35"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="secondary-name-code" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						ALA	Alternative Addressee
						DH	Doing Business As
						DV	Division
						NU	Formerly Known As
						NV	Formerly Doing Business As
						XD	Alias (Other Names Used)
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:enumeration value="ALA"/>
						<xsd:enumeration value="DH"/>
						<xsd:enumeration value="DV"/>
						<xsd:enumeration value="NU"/>
						<xsd:enumeration value="NV"/>
						<xsd:enumeration value="XD"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="address-components">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="address-component" type="isf:addressComponentType" minOccurs="1" maxOccurs="6"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="city">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="35"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="state-province-code" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="3"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="postal-code" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="15"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="country" type="data:countryCodeType"/>
		</xsd:all>
	</xsd:complexType>

	<!-- **************************************************************** -->
	<xsd:complexType name="addressComponentType">
		<xsd:all>
			<xsd:element name="component-type">
				<xsd:annotation>
					<xsd:documentation>
						01 	Street Number
						02 	Street Name
						05 	P.O. Box Number
						12 	Building Name
						13	Apartment Number
						14 	Suite Number
						15	Unstructured Street Address
						28 	Association Name
						30 	Pier
						31 	Wing
						32 	Floor Number
						35 	Room
						37 	Unit
						57 	Cross Street
						AK	Building Number
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:enumeration value="01"/>
						<xsd:enumeration value="02"/>
						<xsd:enumeration value="05"/>
						<xsd:enumeration value="12"/>
						<xsd:enumeration value="13"/>
						<xsd:enumeration value="14"/>
						<xsd:enumeration value="15"/>
						<xsd:enumeration value="28"/>
						<xsd:enumeration value="30"/>
						<xsd:enumeration value="31"/>
						<xsd:enumeration value="32"/>
						<xsd:enumeration value="35"/>
						<xsd:enumeration value="37"/>
						<xsd:enumeration value="57"/>
						<xsd:enumeration value="AK"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="address-information">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="35"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:all>
	</xsd:complexType>
	
	<!-- **************************************************************** -->
	<xsd:complexType name="productType">
		<xsd:all>
			<xsd:element name="tariff-number">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:pattern value="\d{6,10}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="country-of-origin" type="data:countryCodeType"/>
			<xsd:element name="part-number" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="50"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="census-quantity1" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:double"/>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="census-quantity2" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:double"/>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="invoice-quantity" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:double"/>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="invoice-unit-value" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:double"/>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="invoice-value" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="data:dollarAmountType"/>
				</xsd:simpleType>
			</xsd:element>
		</xsd:all>
	</xsd:complexType>
	
	<!-- **************************************************************** -->
	<xsd:complexType name="passportType">
		<xsd:all>
			<xsd:element name="passport-number">
				<xsd:simpleType>
					<xsd:restriction base="xsd:token">
						<xsd:maxLength value="15"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="date-of-birth" type="xsd:date"/>
			<xsd:element name="issuing-country" type="data:countryCodeType"/>
		</xsd:all>
	</xsd:complexType>
</xsd:schema>