<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sefaz.am.gov.br/die"
	xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.sefaz.am.gov.br/die"
	elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
		schemaLocation="xmldsig-core-schema_v1.01.xsd" />
	<xs:element name="enviDIe" type="TEnviDIe">
		<xs:annotation>
			<xs:documentation> Schema XML de validação de Envio de Declaração de Importação
				Eletrônica (DI-e) </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="TEnviDIe">
		<xs:annotation>
			<xs:documentation> Tipo Pedido de Concessão de Autorização da Declaração de Importação
				Eletrônica (DI-e) </xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="DIe" type="TDIe" maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="versao" type="TVerDIe" use="required" />
	</xs:complexType>
	<xs:complexType name="TDIe">
		<xs:sequence>
			<xs:element name="InfDIe">
				<xs:complexType>
					<xs:annotation>
						<xs:documentation> Tipo Pedido de Concessão de Autorização da Declaração de
							Importação Eletrônica (DI-e) </xs:documentation>
					</xs:annotation>
					<xs:sequence>
						<xs:element name="tipoDAI" type="TTipoDIe" />
						<xs:element name="nrDocumento" type="TNumeroDIe" />
						<xs:element name="versaoDuimp" type="TValor5Maiorq0" />
						<xs:element name="dtDocumento" type="TData" />
						<xs:element name="numRetificacao" type="TRetificacaoDIe" />
						<xs:element name="cpfResponsavel" type="TTipoCPF" />
						<xs:element name="vlFob" type="TValor17Maiorq0" />
						<xs:element name="vlFrete" type="TValor17" />
						<xs:element name="vlSeguro" type="TValor17" />
						<xs:element name="vlII" type="TValor17" />
						<xs:element name="vlIPI" type="TValor17" />
						<xs:element name="vlPisCofins" type="TValor17" />
						<xs:element name="vlCide" type="TValor17" />
						<xs:element name="vlAntiDumping" type="TValor17" />
						<xs:element name="vlMultasJuros" type="TValor17" />
						<xs:element name="vlTaxasDiversas" type="TValor17" />
						<xs:element name="vlTaxasCapatazia" type="TValor17" />
						<xs:element name="vlAfrmm" type="TValor17" />
						<xs:element name="UFImportador" type="TUf" />
						<xs:element name="vlTaxaDolar" type="TValor13Maiorq0" />
						<xs:element name="vlPesoLiquido" type="TValor17Maiorq0" />
						<xs:element name="cdRecintoAduaneiro" type="TRecinto" />
						<xs:element name="cdPaisProcedencia" type="TPais" />
						<xs:element name="quantidadeItens" type="TValor5Maiorq0" />	
						<xs:element name="txInfoCompl" type="TInfoCompl" />
						<xs:element name="vlTotalCreditoGnre" type="TValor17" minOccurs="0" />
						<xs:element name="item" type="TItemDIe" maxOccurs="unbounded" />
						<xs:element name="lacre" type="TLacreDIe" minOccurs="0"
							maxOccurs="unbounded" />
						<xs:element name="extratoRetificadorAvulso" type="TExtratoRetificadorAvulso"
							minOccurs="0" maxOccurs="unbounded" />
						<xs:element name="aproveitamentoCreditoGnre"
							type="TAproveitamentoCreditoGnre" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attribute name="versao" type="TVerDIe" use="required" />
					<xs:attribute name="Id" use="required">
						<xs:annotation>
							<xs:documentation>validação do Id</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="xs:ID">
								<xs:pattern value="DIe[0-9]{2}[A-Z]{2}[0-9]{11}" />
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
				</xs:complexType>
			</xs:element>
			<xs:element ref="ds:Signature" />
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="TTipoCPF">
		<xs:annotation>
		<xs:documentation>Tipo Número do CPF</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
		<xs:whiteSpace value="preserve"/>
		<xs:pattern value="[0-9]{11}"/>
		</xs:restriction>
	</xs:simpleType>	
	<xs:complexType name="TLacreDIe">
		<xs:annotation>
			<xs:documentation>Tipo Lacres da Declaração de Importação Eletrônica (DI-e)</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="tpVeiculo" type="TTpVeiculo" />
			<xs:element name="idVeiculo" type="TIdVeiculo" />
			<xs:element name="nrLacre" type="TNrLacre" />
		</xs:sequence>
		<xs:attribute name="versao" type="TVerDIe" use="required" />
	</xs:complexType>
	<xs:complexType name="TExtratoRetificadorAvulso">
		<xs:annotation>
			<xs:documentation>Tipo Extrato Retificador Avulso</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="cdImportador" type="TValor14" />
			<xs:element name="cdTributacao" type="TCdTributacao" />
			<xs:element name="numeroExtrato" type="TNumeroExtrato" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TAproveitamentoCreditoGnre">
		<xs:annotation>
			<xs:documentation>Tipo Aproveitamento de crédito de GNRE em extratos</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="cdImportador" type="TValor14" />
			<xs:element name="nrTributo" type="TValor4" />
			<xs:element name="vlAproveitamento" type="TValor17" />
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="TNumeroExtrato">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="999999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="TItemDIe">
		<xs:annotation>
			<xs:documentation>Tipo Itens da Declaração de Importação Eletrônica (DI-e)</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="numItem" type="TValor5Maiorq0" />
			<xs:element name="fundamentoLegal" type="TValor6Maiorq0" />
			<xs:element name="tipoImportador" type="TImportador" />
			<xs:element name="cdImportador" type="TValor14" />
			<xs:element name="nomeImportador" type="TNomeImp" />
			<xs:element name="nomeFornecedor" type="TNomeFornec" />
			<xs:element name="cdDestinacao" type="TDestinacao" />
			<xs:element name="cdUtilizacao" type="TUtilizacao" />
			<xs:element name="cdNcmItem" type="TNcmMaiorq0" />
			<xs:element name="cdDestaqueItem" type="TValor4" minOccurs="0" />
			<xs:element name="txDescricaoSuframa" type="TDescSuframa" minOccurs="0" />
			<xs:element name="txDescricaoDetalhada" type="TDescDetalhada" />
			<xs:element name="qtdItem" type="TValor17Maiorq0" />
			<xs:element name="unidadeMedida" type="TUnidMedida" />
			<xs:element name="vlUnitario" type="TValor17Maiorq0" />
			<xs:element name="vlTotal" type="TValor17" />
			<xs:element name="cdNcmProdFinal" type="TNcm" nillable="true" minOccurs="0" />
			<xs:element name="cdSuframa" type="TcdSuframa" nillable="true" minOccurs="0000" />
			<xs:element name="vlFob" type="TValor17Maiorq0" />
			<xs:element name="vlFrete" type="TValor0" />
			<xs:element name="vlSeguro" type="TValor0" />
			<xs:element name="vlIi" type="TValor0" />
			<xs:element name="vlIpi" type="TValor0" />
			<xs:element name="vlPisCofins" type="TValor0" />
			<xs:element name="vlCide" type="TValor0" />
			<xs:element name="vlAntiDumping" type="TValor0" />
			<xs:element name="vlMultaseJuros" type="TValor0" />
			<xs:element name="vlTaxasDiversas" type="TValor0" />
			<xs:element name="vlTaxasCapatazia" type="TValor0" />
			<xs:element name="vlPesoLiquido" type="TValor1" />
			<xs:element name="cdTributacao" type="TCdTributacao" />
			<xs:element name="vlBcIcms" type="TValor1" />
			<xs:element name="vlCm" type="TCoeficienteMultiplic" />
			<xs:element name="vlIcms" type="TValor17" />
			<xs:element name="cdTributacaoSI" type="TCdTributacao" minOccurs="0" />
			<xs:element name="vlCmSI" type="TCoeficienteMultiplic" minOccurs="0" />
			<xs:element name="vlIcmsSI" type="TValor17" minOccurs="0" />
			<xs:element name="cdCest" type="TCest" minOccurs="0" />
			<xs:element name="cdTributacaoFPS" type="TCdTributacaoFPS" minOccurs="0" />
			<xs:element name="vlCmFPS" type="TCoeficienteMultiplic" minOccurs="0" />
			<xs:element name="vlFPS" type="TValor17" minOccurs="0" />
			<xs:element name="csPMPF" type="TcsPMPF" />
			<xs:element name="vlPMPF" type="TValor10" minOccurs="0" />
			<xs:element name="docSuspPagDescricao" type="TValor0" minOccurs="0" />
			<xs:element name="docSuspPagValidade" type="TData" minOccurs="0" />
			<xs:element name="docSuspPagTipo" type="TDocumentoSuspensaoPagamento" minOccurs="0" />
			<xs:element name="docSuspPagTipoOperacao"
			type="TDocumentoSuspensaoPagamentoTipoOperacao" minOccurs="0" />
			<xs:element name="nrPexPam" type="TValor9" minOccurs="0" />
		</xs:sequence>
		<xs:attribute name="versao" type="TVerDIe" use="required" />
	</xs:complexType>
	
	<xs:simpleType name="TNumeroDIe">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{2}[A-Z]{2}[0-9]{11}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TTipoDIe">
		<xs:annotation>
			<xs:documentation>Tipo da DI-e</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="01" />
			<xs:enumeration value="02" />
			<xs:enumeration value="03" />
			<xs:enumeration value="04" />
			<xs:enumeration value="05" />
			<xs:enumeration value="06" />
			<xs:enumeration value="07" />
			<xs:enumeration value="08" />
			<xs:enumeration value="09" />
			<xs:enumeration value="10" />
			<xs:enumeration value="11" />
			<xs:enumeration value="12" />
		</xs:restriction>	
	</xs:simpleType>
	<xs:simpleType name="TQtdItensDIe">
		<xs:annotation>
			<xs:documentation>Tipo Quantidade de Itens da DIe</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:pattern value="[0-9]{3}" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TVerDIe">
		<xs:annotation>
			<xs:documentation> Tipo Versão da DI-e - 3.00</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:pattern value="3\.00" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TRetificacaoDIe">
		<xs:annotation>
			<xs:documentation>Tipo da Retificação da DI-e</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="0" />
			<xs:enumeration value="1" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TcsPMPF">
		<xs:annotation>
			<xs:documentation>Tipo da informação de item com PMPF</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="S" />
			<xs:enumeration value="N" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TData">
		<xs:annotation>
			<xs:documentation> Tipo data AAAAMMDD</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:pattern
				value="(((20(([02468][048])|([13579][26]))0229))|(20[0-9][0-9])((((0[1-9])|(1[0-2]))((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))31)|(((0[1,3-9])|(1[0-2]))(29|30)))))" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor0">
		<xs:annotation>
			<xs:documentation>Tipo Número dos Valores da DIe</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:nonNegativeInteger" />
	</xs:simpleType>
	<xs:simpleType name="TValor1">
		<xs:annotation>
			<xs:documentation>Tipo Número dos Valores da DIe</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:positiveInteger" />
	</xs:simpleType>
	<xs:simpleType name="TUf">
		<xs:annotation>
			<xs:documentation>Tipo Sigla da UF - Unidade da Federação</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:positiveInteger">
			<xs:enumeration value="11" />
			<xs:enumeration value="12" />
			<xs:enumeration value="13" />
			<xs:enumeration value="14" />
			<xs:enumeration value="15" />
			<xs:enumeration value="16" />
			<xs:enumeration value="17" />
			<xs:enumeration value="21" />
			<xs:enumeration value="22" />
			<xs:enumeration value="23" />
			<xs:enumeration value="24" />
			<xs:enumeration value="25" />
			<xs:enumeration value="26" />
			<xs:enumeration value="27" />
			<xs:enumeration value="28" />
			<xs:enumeration value="29" />
			<xs:enumeration value="31" />
			<xs:enumeration value="32" />
			<xs:enumeration value="33" />
			<xs:enumeration value="35" />
			<xs:enumeration value="41" />
			<xs:enumeration value="42" />
			<xs:enumeration value="43" />
			<xs:enumeration value="50" />
			<xs:enumeration value="51" />
			<xs:enumeration value="52" />
			<xs:enumeration value="53" />
		</xs:restriction>
	</xs:simpleType>
	<!-- @todo completar lista pais -->
	<xs:simpleType name="TPais">
		<xs:annotation>
			<xs:documentation>Código do país no formato ISSO2 (3166-1)</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-Z]{2}" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TRecinto">
		<xs:annotation>
			<xs:documentation>Tipo de Recinto Aduaneiro da DI-e</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="0000005" />
			<xs:enumeration value="0000006" />
			<xs:enumeration value="0000600" />
			<xs:enumeration value="2401502" />
			<xs:enumeration value="2932001" />
			<xs:enumeration value="2933201" />
			<xs:enumeration value="2931607" />
			<xs:enumeration value="2931606" />
			<xs:enumeration value="2931605" />
			<xs:enumeration value="2931604" />
			<xs:enumeration value="2931603" />
			<xs:enumeration value="2931602" />
			<xs:enumeration value="2931601" />
			<xs:enumeration value="2931504" />
			<xs:enumeration value="2931503" />
			<xs:enumeration value="2931502" />
			<xs:enumeration value="2951101" />
			<xs:enumeration value="2943401" />
			<xs:enumeration value="2941101" />
			<xs:enumeration value="2931608" />
			<xs:enumeration value="2222222" />
			<xs:enumeration value="2931612"/>
			<xs:enumeration value="2951901" />
			<xs:enumeration value="3333333" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TDocumentoSuspensaoPagamento">
		<xs:annotation>
			<xs:documentation>Tipo de Documento de Suspensão de Pagamento</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="collapse" />
			<xs:enumeration value="1" />
			<xs:enumeration value="2" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TDocumentoSuspensaoPagamentoTipoOperacao">
		<xs:annotation>
			<xs:documentation>Tipo de Operação de Suspensão de Pagamento</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="collapse" />
			<xs:enumeration value="1" />
			<xs:enumeration value="2" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="TCdTributacao">
		<xs:annotation>
			<xs:documentation>Tipo Código de Tributação</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="N501" />
			<xs:enumeration value="N502" />
			<xs:enumeration value="N503" />
			<xs:enumeration value="N504" />
			<xs:enumeration value="N505" />
			<xs:enumeration value="N506" />
			<xs:enumeration value="N507" />
			<xs:enumeration value="N508" />
			<xs:enumeration value="N509" />
			<xs:enumeration value="N510" />
			<xs:enumeration value="N511" />
			<xs:enumeration value="N512" />
			<xs:enumeration value="N513" />
			<xs:enumeration value="N514" />
			<xs:enumeration value="N515" />
			<xs:enumeration value="N516" />
			<xs:enumeration value="N517" />
			<xs:enumeration value="N518" />
			<xs:enumeration value="N519" />
			<xs:enumeration value="N520" />
			<xs:enumeration value="N521" />
			<xs:enumeration value="N522" />
			<xs:enumeration value="N523" />
			<xs:enumeration value="N524" />
			<xs:enumeration value="N525" />
			<xs:enumeration value="R502" />
			<xs:enumeration value="R503" />
			<xs:enumeration value="R504" />
			<xs:enumeration value="R505" />
			<xs:enumeration value="R506" />
			<xs:enumeration value="R507" />
			<xs:enumeration value="R508" />
			<xs:enumeration value="R509" />
			<xs:enumeration value="R510" />
			<xs:enumeration value="R511" />
			<xs:enumeration value="S501" />
			<xs:enumeration value="S502" />
			<xs:enumeration value="S503" />
			<xs:enumeration value="S504" />
			<xs:enumeration value="S505" />
			<xs:enumeration value="S506" />
			<xs:enumeration value="S507" />
			<xs:enumeration value="S508" />
			<xs:enumeration value="S509" />
			<xs:enumeration value="S510" />
			<xs:enumeration value="S511" />
			<xs:enumeration value="S512" />
			<xs:enumeration value="S513" />
			<xs:enumeration value="S514" />
			<xs:enumeration value="S515" />
			<xs:enumeration value="S516" />
			<xs:enumeration value="S517" />
			<xs:enumeration value="S518" />
			<xs:enumeration value="S519" />
			<xs:enumeration value="S520" />
			<xs:enumeration value="S521" />
			<xs:enumeration value="S522" />
			<xs:enumeration value="S523" />
			<xs:enumeration value="S524" />
			<xs:enumeration value="S525" />
			<xs:enumeration value="S526" />
			<xs:enumeration value="S527" />
			<xs:enumeration value="S528" />
			<xs:enumeration value="S530" />
			<xs:enumeration value="S531" />
			<xs:enumeration value="S532" />
			<xs:enumeration value="S533" />
			<xs:enumeration value="S534" />
			<xs:enumeration value="S535" />
			<xs:enumeration value="S536" />
			<xs:enumeration value="S538" />
			<xs:enumeration value="S539" />
			<xs:enumeration value="S540" />
			<xs:enumeration value="S541" />
			<xs:enumeration value="S542" />
			<xs:enumeration value="S543" />
			<xs:enumeration value="S544" />
			<xs:enumeration value="S545" />
			<xs:enumeration value="S546" />
			<xs:enumeration value="S547" />
			<xs:enumeration value="S548" />
			<xs:enumeration value="S549" />
			<xs:enumeration value="S550" />
			<xs:enumeration value="S551" />
			<xs:enumeration value="S552" />
			<xs:enumeration value="S553" />
			<xs:enumeration value="S554" />
			<xs:enumeration value="S555" />
			<xs:enumeration value="S556" />
			<xs:enumeration value="S557" />
			<xs:enumeration value="S558" />
			<xs:enumeration value="S559" />
			<xs:enumeration value="S560" />
			<xs:enumeration value="S561" />
			<xs:enumeration value="S562" />
			<xs:enumeration value="S563" />
			<xs:enumeration value="S564" />
			<xs:enumeration value="S565" />
			<xs:enumeration value="S566" />
			<xs:enumeration value="S567" />
			<xs:enumeration value="S568" />
			<xs:enumeration value="S569" />
			<xs:enumeration value="S570" />
			<xs:enumeration value="S571" />
			<xs:enumeration value="S572" />
			<xs:enumeration value="S573" />
			<xs:enumeration value="S574" />
			<xs:enumeration value="S575" />
			<xs:enumeration value="S576" />
			<xs:enumeration value="S577" />
			<xs:enumeration value="S578" />
			<xs:enumeration value="S579" />
			<xs:enumeration value="S580" />
			<xs:enumeration value="S581" />
			<xs:enumeration value="S582" />
			<xs:enumeration value="S583" />
			<xs:enumeration value="S584" />
			<xs:enumeration value="S585" />
			<xs:enumeration value="S586" />
			<xs:enumeration value="S587" />
			<xs:enumeration value="S588" />
			<xs:enumeration value="S589" />
			<xs:enumeration value="S590" />
			<xs:enumeration value="S591" />
			<xs:enumeration value="S592" />
			<xs:enumeration value="S593" />
			<xs:enumeration value="S594" />
			<xs:enumeration value="S595" />
			<xs:enumeration value="S596" />
			<xs:enumeration value="S597" />
			<xs:enumeration value="S598" />
			<xs:enumeration value="S599" />
			<xs:enumeration value="S600" />
			<xs:enumeration value="S601" />
			<xs:enumeration value="S602" />
			<xs:enumeration value="S603" />
			<xs:enumeration value="S604" />
			<xs:enumeration value="S605" />
			<xs:enumeration value="S606" />
			<xs:enumeration value="S607" />
			<xs:enumeration value="S608" />
			<xs:enumeration value="S609" />
			<xs:enumeration value="S610" />
			<xs:enumeration value="S611" />
			<xs:enumeration value="S612" />
			<xs:enumeration value="S613" />
			<xs:enumeration value="S614" />
			<xs:enumeration value="S615" />
			<xs:enumeration value="S616" />
			<xs:enumeration value="S617" />
			<xs:enumeration value="S618" />
			<xs:enumeration value="S619" />
			<xs:enumeration value="S620" />
			<xs:enumeration value="S621" />
			<xs:enumeration value="S622" />
			<xs:enumeration value="S623" />
			<xs:enumeration value="S624" />
			<xs:enumeration value="S625" />
			<xs:enumeration value="S626" />
			<xs:enumeration value="S627" />
			<xs:enumeration value="S628" />
			<xs:enumeration value="S629" />
			<xs:enumeration value="S630" />
			<xs:enumeration value="S631" />
			<xs:enumeration value="S632" />
			<xs:enumeration value="S633" />
			<xs:enumeration value="S634" />
			<xs:enumeration value="S635" />
			<xs:enumeration value="S636" />
			<xs:enumeration value="S637" />
			<xs:enumeration value="S638" />
			<xs:enumeration value="S639" />
			<xs:enumeration value="S640" />
			<xs:enumeration value="S641" />
			<xs:enumeration value="S642" />
			<xs:enumeration value="S643" />
			<xs:enumeration value="S644" />
			<xs:enumeration value="S645" />
			<xs:enumeration value="S646" />
			<xs:enumeration value="S647" />
			<xs:enumeration value="S648" />
			<xs:enumeration value="S649" />
			<xs:enumeration value="S650" />
			<xs:enumeration value="S651" />
			<xs:enumeration value="S652" />
			<xs:enumeration value="S653" />
			<xs:enumeration value="S654" />
			<xs:enumeration value="S655" />
			<xs:enumeration value="S656" />
			<xs:enumeration value="S657" />
			<xs:enumeration value="S658" />
			<xs:enumeration value="S659" />
			<xs:enumeration value="S661" />
			<xs:enumeration value="S662" />
			<xs:enumeration value="S663" />
			<xs:enumeration value="T501" />
			<xs:enumeration value="T502" />
			<xs:enumeration value="T503" />
			<xs:enumeration value="T504" />
			<xs:enumeration value="T505" />
			<xs:enumeration value="T506" />
			<xs:enumeration value="T507" />
			<xs:enumeration value="T508" />
			<xs:enumeration value="T509" />
			<xs:enumeration value="T510" />
			<xs:enumeration value="T511" />
			<xs:enumeration value="T512" />
			<xs:enumeration value="T513" />
			<xs:enumeration value="T514" />
			<xs:enumeration value="T515" />
			<xs:enumeration value="T516" />
			<xs:enumeration value="M001" />
			<xs:enumeration value="M002" />
			<xs:enumeration value="M003" />
			<xs:enumeration value="M004" />
			<xs:enumeration value="M005" />
			<xs:enumeration value="M006" />
			<xs:enumeration value="M007" />
			<xs:enumeration value="M008"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TCdTributacaoFPS">
		<xs:annotation>
			<xs:documentation>Tipo Código de Tributação</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="F511" />
			<xs:enumeration value="F512" />
			<xs:enumeration value="F513" />
			<xs:enumeration value="F514" />
			<xs:enumeration value="F515" />
			<xs:enumeration value="F516" />
			<xs:enumeration value="F517" />
			<xs:enumeration value="F518" />
			<xs:enumeration value="F519" />
			<xs:enumeration value="F520" />
			<xs:enumeration value="F521" />
			<xs:enumeration value="F522" />
			<xs:enumeration value="F523" />
			<xs:enumeration value="F524" />
			<xs:enumeration value="F525" />
			<xs:enumeration value="F526" />
			<xs:enumeration value="F527" />
			<xs:enumeration value="F528" />
			<xs:enumeration value="F529" />
			<xs:enumeration value="F530" />
			<xs:enumeration value="F531" />
			<xs:enumeration value="F532" />
			<xs:enumeration value="F533" />
			<xs:enumeration value="F534" />
			<xs:enumeration value="F535" />
			<xs:enumeration value="F536" />
			<xs:enumeration value="F537" />
			<xs:enumeration value="F538" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TImportador">
		<xs:annotation>
			<xs:documentation>Tipo do Importador do Item DI-e</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="1" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TNomeImp">
		<xs:annotation>
			<xs:documentation>Tipo Nome do Importador</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="60" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TNomeFornec">
		<xs:annotation>
			<xs:documentation>Tipo Nome do Fornecedor</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="60" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TInfoCompl">
		<xs:annotation>
			<xs:documentation>Informacoes Complementares da DI</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="4000" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TDestinacao">
		<xs:annotation>
			<xs:documentation>Tipo da Destinação do Item da DI-e</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="01" />
			<xs:enumeration value="02" />
			<xs:enumeration value="03" />
			<xs:enumeration value="04" />
			<xs:enumeration value="05" />
			<xs:enumeration value="06" />
			<xs:enumeration value="07" />
			<xs:enumeration value="08" />
			<xs:enumeration value="09" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TUtilizacao">
		<xs:annotation>
			<xs:documentation>Tipo da Utilizacao do Item da DI-e</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve" />
			<xs:enumeration value="00" />
			<xs:enumeration value="01" />
			<xs:enumeration value="02" />
			<xs:enumeration value="03" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TDescSuframa">
		<xs:annotation>
			<xs:documentation>Tipo Descricao SUFRAMA</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="255" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TcdSuframa">
		<xs:annotation>
			<xs:documentation>Codigo SUFRAMA/SEFAZ</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="4" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TDescDetalhada">
		<xs:annotation>
			<xs:documentation>Tipo Descricao Detalhada</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1" />
			<xs:maxLength value="3900" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor17Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="99999999999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor17">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="99999999999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor10Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="9999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor10">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="9999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor13Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="9999999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor7Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="9999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor5Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="99999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor6Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor3Maiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor14">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="99999999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TNcm">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="99999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TCest">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{3,7}" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor4">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="9999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TCoeficienteMultiplic">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TNumeroDIoutras">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="9999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TUnidMedida">
		<xs:annotation>
			<xs:documentation>Tipo Unidade de Medida</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1" />
			<xs:maxLength value="20" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TTpVeiculo">
		<xs:restriction base="xs:integer">
			<xs:enumeration value="1" />
			<xs:enumeration value="2" />
			<xs:enumeration value="3" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TIdVeiculo">
		<xs:restriction base="xs:string">
			<xs:minLength value="7" />
			<xs:maxLength value="20" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TNrLacre">
		<xs:restriction base="xs:string">
			<xs:minLength value="1" />
			<xs:maxLength value="20" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor9">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="999999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TValor8">
		<xs:restriction base="xs:integer">
			<xs:maxInclusive value="99999999" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TNcmMaiorq0">
		<xs:restriction base="xs:positiveInteger">
			<xs:maxInclusive value="99999999" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>