<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/cte" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://www.portalfiscal.inf.br/cte" targetNamespace="http://www.portalfiscal.inf.br/cte" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:include schemaLocation="eventoCTeTiposBasico_v3.00.xsd"/>
	<xs:element name="evCTeRegPassagem">
		<xs:annotation>
			<xs:documentation>Schema XML de validação do evento de Registro de Passagem do CT-e 310620 </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="descEvento">
					<xs:annotation>
						<xs:documentation>Descrição do Evento - “Registro de Passagem”</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:whiteSpace value="preserve"/>
							<xs:enumeration value="Registro de Passagem"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="cUFTransito" type="TCodUfIBGE">
					<xs:annotation>
						<xs:documentation>Informar o código da UF onde foi registrada a passagem. Deverá ser utilizada a tabela do IBGE.</xs:documentation>
						<xs:documentation>Informar 'EX' para operações com o exterior.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="cUnidFiscal">
					<xs:annotation>
						<xs:documentation>Código da Unidade Fiscal</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:pattern value="[0-9]{4}"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="xUnidFiscal">
					<xs:annotation>
						<xs:documentation>Nome da Unidade Fiscal</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="TString">
							<xs:minLength value="1"/>
							<xs:maxLength value="60"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="dhPass" type="TDateTimeUTC">
					<xs:annotation>
						<xs:documentation>Data e hora do Registro de Passagem</xs:documentation>
						<xs:documentation>Formato AAAA-MM-DDTHH:MM:DD</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="CPFFunc" type="TCpf">
					<xs:annotation>
						<xs:documentation>Identificação do funcionário responsável pelo registro de passagem</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="xFunc">
					<xs:annotation>
						<xs:documentation>Nome do funcionário responsável pelo registro de passagem</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="TString">
							<xs:minLength value="1"/>
							<xs:maxLength value="60"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="tpTransm">
					<xs:annotation>
						<xs:documentation>Tipo de Transmissão: N – Normal; A – Atrasada</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:whiteSpace value="preserve"/>
							<xs:enumeration value="N"/>
							<xs:enumeration value="A"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="tpSentido">
					<xs:annotation>
						<xs:documentation>Sentido da Passagem:
E – Entrada; S – Saída; I - Indeterminado
</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:whiteSpace value="preserve"/>
							<xs:enumeration value="E"/>
							<xs:enumeration value="S"/>
							<xs:enumeration value="I"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="latitude" type="TLatitude" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Latitude do ponto geográfico onde foi registrada a passagem</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="longitude" type="TLongitude" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Latitude do ponto geográfico onde foi registrada a passagem</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="placa" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Placa do Veiculo de Tracao</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="TPlaca"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="SegCodBarras" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Segundo código de barras do CT-e em contingência</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:pattern value="[0-9]{36}"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="chMDFe" type="TChNFe" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Chave de Acesso do MDF-e que originou o registro</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="xObs" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Informações complementares do Fisco de Registro de Passagem</xs:documentation>
						<xs:documentation>Norma referenciada, informações complementares, etc</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="TString">
							<xs:maxLength value="2000"/>
							<xs:minLength value="1"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
