<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd"/>
	<xs:include schemaLocation="tiposBasico_v1.02.xsd"/>
	<xs:complexType name="TAtuCadEmiDFe">
		<xs:annotation>
			<xs:documentation>Tipo Comunica atualização de cadastro de emissores de DF-e</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="infAtuCadEmiDFe">
				<xs:annotation>
					<xs:documentation>Dados Comunica atualização de cadastro de emissores de DF-e</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="UF" type="TUf">
							<xs:annotation>
								<xs:documentation>sigla da UF solicitante</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:choice>
							<xs:element name="inclui" type="TEmissor">
								<xs:annotation>
									<xs:documentation>Inclusão de novo Emissor</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="exclui">
								<xs:annotation>
									<xs:documentation>Exclui emissor inserido indevidamente</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element name="UF" type="TUf">
											<xs:annotation>
												<xs:documentation>Sigla da UF onde o emissor está autorizado a emitir DF-e</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:element name="CNPJ">
											<xs:annotation>
												<xs:documentation>CNPJ do emissor a ser excluído</xs:documentation>
											</xs:annotation>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:choice>
					</xs:sequence>
					<xs:attribute name="Id" type="xs:ID" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element ref="ds:Signature"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerCadEmi" use="required"/>
	</xs:complexType>
	<xs:complexType name="TRetAtuCadEmiDFe">
		<xs:annotation>
			<xs:documentation>Tipo Retorno da atualização de cadastro de emissores de DF-e</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="infRetAtuCadEmiDFe">
				<xs:annotation>
					<xs:documentation>Dados do retorno do processamento daa Comunicção de atualização de cadastro de emissores de DF-e</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="UF" type="TUf">
							<xs:annotation>
								<xs:documentation>sigla da UF onde o emissor está autorizado a emitir DF-e</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="CNPJ">
							<xs:annotation>
								<xs:documentation>CNPJ do emissor</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="ope">
							<xs:annotation>
								<xs:documentation>operação solicitada:
0 - inclusão;
1 - exclusão.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:token">
									<xs:enumeration value="0"/>
									<xs:enumeration value="1"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="resOpe">
							<xs:annotation>
								<xs:documentation>Resultado da operação solicitada
0 - operação realizada com sucesso;
1 - Rejeição -mensagem inválida (erro de
Schema);
21- Rejeição - certificado digital não atende o
padrão estabelecido pelo projeto;
22 - Rejeição - certificado digital utilizado na
assinatura revogado;
23 - Rejeição - certificado digital utilizado na
assinatura expirado;
24 - Rejeição - certificado digital utilizado não
pertence a UF solicitante;
25 - Rejeição - assinatura digital inválida;
31 - Rejeição -CNPJ emissor inválido;
32 - Rejeição-CNPJ matriz inválido;
41 - Inclusão não atendida - Já existe um
emissor com o CNPJ informado;
42 - exclusão não atendida - não existe
emissor com CNPJ informado;</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:token">
									<xs:enumeration value="0"/>
									<xs:enumeration value="1"/>
									<xs:enumeration value="21"/>
									<xs:enumeration value="22"/>
									<xs:enumeration value="23"/>
									<xs:enumeration value="25"/>
									<xs:enumeration value="31"/>
									<xs:enumeration value="32"/>
									<xs:enumeration value="41"/>
									<xs:enumeration value="42"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="Id" type="xs:ID" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element ref="ds:Signature"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerCadEmi" use="required"/>
	</xs:complexType>
	<xs:complexType name="TCadEmiDFe">
		<xs:annotation>
			<xs:documentation>Tipo Cadastro de emissores de DF-e</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="infCadEmiDFe">
				<xs:annotation>
					<xs:documentation>Dados  do cadastro de emissores de DF-e</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="dPubCad" type="xs:date">
							<xs:annotation>
								<xs:documentation>Data de publicação da Cadastro</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="emissor" type="TEmissor" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="Id" type="xs:ID" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element ref="ds:Signature"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerCadEmi" use="required"/>
	</xs:complexType>
	<xs:complexType name="TEmissor">
		<xs:annotation>
			<xs:documentation>Tipo Emissor</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="UF" type="TUf">
				<xs:annotation>
					<xs:documentation>sigla da UF onde o emissor está autorizado a emitir DF-e</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CNPJ" type="TCnpj">
				<xs:annotation>
					<xs:documentation>CNPJ do Emissor</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CNPJMatriz" type="TCnpj">
				<xs:annotation>
					<xs:documentation>CNPJ do Estabelecimento matriz</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="IE" type="TIe">
				<xs:annotation>
					<xs:documentation>IE do emissor</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="DFe" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Documento Fiscal eletrônico autorizado</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="mod">
							<xs:annotation>
								<xs:documentation>Modelo do documento fiscal autorizado:
55 - NF-e;
99 - uso exclusivo do Fisco para inclusão de
qualquer órgão público no cadastro de
emissores de DFe com objetivo de permitir o
acesso ao WS - CadConsultaCadastro de
Consulta Cadastro de Contribuintes do ICMS
de qualquer unidade federada.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:token">
									<xs:enumeration value="55"/>
									<xs:enumeration value="99"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="sit">
							<xs:annotation>
								<xs:documentation>Situação do emissor:
0 - em homologação
1 - em produção</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:token">
									<xs:enumeration value="0"/>
									<xs:enumeration value="1"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="TVerCadEmi">
		<xs:annotation>
			<xs:documentation>Tipo Versão do Leiaute 1.01</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:pattern value="1\.01"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
