<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:simpleType name="TAmb">
		<xs:annotation>
			<xs:documentation>Tipo Ambiente</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:enumeration value="1"/>
			<xs:enumeration value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TJust">
		<xs:annotation>
			<xs:documentation>Tipo Justificativa</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="15"/>
			<xs:maxLength value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TStat">
		<xs:annotation>
			<xs:documentation>Tipo Código da Mensagem enviada</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:pattern value="[0-9]{3}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="xMotivo" type="TMotivo">
		<xs:annotation>
			<xs:documentation>Descrição literal do status do serviço solicitado.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:simpleType name="TMotivo">
		<xs:annotation>
			<xs:documentation>Tipo Motivo</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="255"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoChaveNotaFiscal">
		<xs:annotation>
			<xs:documentation>Tipo Chave da Nota Fiscal Eletrônica</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="[0-9]{44}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoUF">
		<xs:annotation>
			<xs:documentation>Tipo Sigla da UF</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:enumeration value="AC"/>
			<xs:enumeration value="AL"/>
			<xs:enumeration value="AM"/>
			<xs:enumeration value="AP"/>
			<xs:enumeration value="BA"/>
			<xs:enumeration value="CE"/>
			<xs:enumeration value="DF"/>
			<xs:enumeration value="ES"/>
			<xs:enumeration value="GO"/>
			<xs:enumeration value="MA"/>
			<xs:enumeration value="MG"/>
			<xs:enumeration value="MS"/>
			<xs:enumeration value="MT"/>
			<xs:enumeration value="PA"/>
			<xs:enumeration value="PB"/>
			<xs:enumeration value="PE"/>
			<xs:enumeration value="PI"/>
			<xs:enumeration value="PR"/>
			<xs:enumeration value="RJ"/>
			<xs:enumeration value="RN"/>
			<xs:enumeration value="RO"/>
			<xs:enumeration value="RR"/>
			<xs:enumeration value="RS"/>
			<xs:enumeration value="SC"/>
			<xs:enumeration value="SE"/>
			<xs:enumeration value="SP"/>
			<xs:enumeration value="TO"/>
			<xs:enumeration value="EX"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TCodUfIBGE">
		<xs:annotation>
			<xs:documentation>Tipo Código da UF da tabela do IBGE</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<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>
	<xs:simpleType name="tipoNumeroFormularioSeguranca">
		<xs:annotation>
			<xs:documentation>Tipo numero formulario de segurança</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="[0-9]{9}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoSerieFormularioSeguranca">
		<xs:annotation>
			<xs:documentation>Tipo série do formulario de segurança</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="[A-Z]{2}|[a-z]{2}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoInteiroMaiorQueZero">
		<xs:annotation>
			<xs:documentation>Tipo inteiro maior que zero</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoCodigoRetorno">
		<xs:annotation>
			<xs:documentation>Tipo código retorno</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="[0-9]{3}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoNumeroProtocolo">
		<xs:annotation>
			<xs:documentation>Tipo numero do protocolo</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="[0-9]{15}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoMensagemRetorno">
		<xs:annotation>
			<xs:documentation>Tipo de mensagem de retorno</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:maxLength value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoVersaoAplicacao">
		<xs:annotation>
			<xs:documentation>Tipo Versão do Aplicativo</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:minLength value="1"/>
			<xs:maxLength value="20"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tipoIdLote">
		<xs:annotation>
			<xs:documentation>Tipo identificação do lote</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="[0-9]{1,15}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="tipoPlaca">
		<xs:annotation>
			<xs:documentation>Tipo da placa</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="numPlaca" type="tipoNumeroPlaca"/>
			<xs:element name="cUF" type="tipoUF"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="tipoNumeroPlaca">
		<xs:annotation>
			<xs:documentation>Tipo da placa - Segue a NT2011/004 do NFE</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:pattern value="([A-Z]{2,3}[0-9]{4}|[A-Z]{3,4}[0-9]{3})"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="tipoFormularioSeguranca">
		<xs:annotation>
			<xs:documentation>Tipo formulario de segurança</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="numero" type="tipoNumeroFormularioSeguranca"/>
			<xs:element name="serie" type="tipoSerieFormularioSeguranca"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
