<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 rel. 2 (http://www.altova.com) by private (private) -->
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/mdfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/mdfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd"/>
	<xs:include schemaLocation="tiposGeralMDFe_v3.00.xsd"/>
	<xs:complexType name="TEvento">
		<xs:annotation>
			<xs:documentation>Tipo Evento</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="infEvento">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="cOrgao" type="TCOrgaoIBGE">
							<xs:annotation>
								<xs:documentation>Código do órgão de recepção do Evento. Utilizar a Tabela do IBGE extendida, utilizar 90 para identificar SUFRAMA, 91 para RFB,  93 para ONE, 94 para SVBA</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="tpAmb" type="TAmb">
							<xs:annotation>
								<xs:documentation>Identificação do Ambiente:
1 - Produção
2 - Homologação</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:choice>
							<xs:annotation>
								<xs:documentation>Identificação do autor do evento</xs:documentation>
							</xs:annotation>
							<xs:element name="CNPJ" type="TCnpj">
								<xs:annotation>
									<xs:documentation>CNPJ do autor</xs:documentation>
									<xs:documentation>Informar zeros não significativos</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="CPF" type="TCpf">
								<xs:annotation>
									<xs:documentation>CPF do Autor</xs:documentation>
									<xs:documentation>Informar zeros não significativos. 
Usar com serie específica 920-969 para emitente pessoa física com inscrição estadual, ou para emissor TAC do Regime Especial da Nota Fiscal Fácil</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:choice>
						<xs:element name="chMDFe" type="TChMDFe">
							<xs:annotation>
								<xs:documentation>Chave de Acesso do MDF-e vinculado ao evento</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="dhEvento" type="TDateTimeUTC">
							<xs:annotation>
								<xs:documentation>Data e Hora do Evento, formato AAAA-MM-DDThh:mm:ss TZD</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="tpEvento" type="xs:string">
							<xs:annotation>
								<xs:documentation>Tipo do Evento:
110111 - Cancelamento
110112 - Encerramento
110114 - Inclusão de Condutor
310620 - Registro de Passagem
510620 - Registro de Passagem BRId</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="nSeqEvento">
							<xs:annotation>
								<xs:documentation>Seqüencial do evento para o mesmo tipo de evento.  Para maioria dos eventos será 1, nos casos em que possa existir mais de um evento o autor do evento deve numerar de forma seqüencial.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:whiteSpace value="preserve"/>
									<xs:pattern value="[0-9]{1,3}"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="detEvento">
							<xs:annotation>
								<xs:documentation>Detalhamento do evento específico</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:any processContents="skip">
										<xs:annotation>
											<xs:documentation>XML do evento
Insira neste local o XML específico do tipo de evento (cancelamento, encerramento, registro de passagem).  </xs:documentation>
										</xs:annotation>
									</xs:any>
								</xs:sequence>
								<xs:attribute name="versaoEvento" type="TVerEvento" use="required"/>
							</xs:complexType>
						</xs:element>
						<xs:element name="infSolicNFF" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Grupo de informações do pedido de registro de evento da Nota Fiscal Fácil</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="xSolic">
										<xs:annotation>
											<xs:documentation>Solicitação do pedido de registro de evento da NFF.</xs:documentation>
											<xs:documentation>Será preenchido com a totalidade de campos informados no aplicativo emissor serializado.</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="TString">
												<xs:minLength value="2"/>
												<xs:maxLength value="8000"/>
											</xs:restriction>
										</xs:simpleType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:element name="infPAA" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Grupo de Informação do Provedor de Assinatura e Autorização</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="CNPJPAA" type="TCnpj">
										<xs:annotation>
											<xs:documentation>CNPJ do Provedor de Assinatura e Autorização</xs:documentation>
										</xs:annotation>
									</xs:element>
									<xs:element name="PAASignature">
										<xs:annotation>
											<xs:documentation>Assinatura RSA do Emitente para DFe gerados por PAA</xs:documentation>
										</xs:annotation>
										<xs:complexType>
											<xs:sequence>
												<xs:element name="SignatureValue" type="xs:base64Binary">
													<xs:annotation>
														<xs:documentation>Assinatura digital padrão RSA</xs:documentation>
														<xs:documentation>Converter o atributo Id do DFe para array de bytes e assinar com a chave privada do RSA com algoritmo SHA1 gerando um valor no formato base64.</xs:documentation>
													</xs:annotation>
												</xs:element>
												<xs:element name="RSAKeyValue" type="TRSAKeyValueType">
													<xs:annotation>
														<xs:documentation>Chave Publica no padrão XML RSA Key</xs:documentation>
													</xs:annotation>
												</xs:element>
											</xs:sequence>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="Id" use="required">
						<xs:annotation>
							<xs:documentation>Identificador da TAG a ser assinada, a regra de formação do Id é:
“ID” + tpEvento +  chave do MDF-e + nSeqEvento</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="xs:ID">
								<xs:pattern value="ID[0-9]{12}[A-Z0-9]{12}[0-9]{28}|ID[0-9]{12}[A-Z0-9]{12}[0-9]{29}"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
				</xs:complexType>
			</xs:element>
			<xs:element ref="ds:Signature"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerEvento" use="required"/>
	</xs:complexType>
	<xs:complexType name="TRetEvento">
		<xs:annotation>
			<xs:documentation>Tipo retorno do Evento</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="infEvento">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="tpAmb" type="TAmb">
							<xs:annotation>
								<xs:documentation>Identificação do Ambiente:
1 - Produção
2 - Homologação</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="verAplic" type="TVerAplic">
							<xs:annotation>
								<xs:documentation>Versão do Aplicativo que recebeu o Evento</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="cOrgao" type="TCOrgaoIBGE">
							<xs:annotation>
								<xs:documentation>Código do órgão de recepção do Evento. Utilizar a Tabela do IBGE extendida, utilizar 90 para identificar SUFRAMA, 91 RFB, 92 BackOffice BRId e 93 ONE</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="cStat" type="TStat">
							<xs:annotation>
								<xs:documentation>Código do status da registro do Evento</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="xMotivo" type="TMotivo">
							<xs:annotation>
								<xs:documentation>Descrição literal do status do registro do Evento</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="chMDFe" type="TChMDFe" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Chave de Acesso MDF-e vinculado</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="tpEvento" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Tipo do Evento vinculado</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:whiteSpace value="preserve"/>
									<xs:pattern value="[0-9]{6}"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="xEvento" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Descrição do Evento</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="TString">
									<xs:minLength value="5"/>
									<xs:maxLength value="60"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="nSeqEvento" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Seqüencial do evento</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:whiteSpace value="preserve"/>
									<xs:pattern value="[0-9]{1,3}"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="dhRegEvento" type="TDateTimeUTC" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Data e Hora de do recebimento do evento ou do registro do evento formato AAAA-MM-DDThh:mm:ss TZD</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="nProt" type="TProt" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Número do protocolo de registro do evento</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="Id" use="optional">
						<xs:simpleType>
							<xs:restriction base="xs:ID">
								<xs:pattern value="ID[0-9]{15}"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
				</xs:complexType>
			</xs:element>
			<xs:element ref="ds:Signature" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerEvento" use="required"/>
	</xs:complexType>
	<xs:complexType name="TProcEvento">
		<xs:annotation>
			<xs:documentation>Tipo procEvento</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="eventoMDFe" type="TEvento"/>
			<xs:element name="retEventoMDFe" type="TRetEvento"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerEvento" use="required"/>
		<xs:attribute name="ipTransmissor" type="TIPv4" use="optional">
			<xs:annotation>
				<xs:documentation>IP do transmissor do documento fiscal para o ambiente autorizador</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="nPortaCon" use="optional">
			<xs:annotation>
				<xs:documentation>Porta de origem utilizada na conexão (De 0 a 65535)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="[0-9]{1,5}"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="dhConexao" type="TDateTimeUTC" use="optional">
			<xs:annotation>
				<xs:documentation>Data e Hora da Conexão de Origem</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="TVerEvento">
		<xs:annotation>
			<xs:documentation>Tipo Versão do Evento</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:pattern value="3\.00"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
