<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2008 (http://www.altova.com) by sas-softwares@procergs.rs.gov.br (PROCERGS) -->
<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#" targetNamespace="http://www.portalfiscal.inf.br/cte" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:include schemaLocation="tiposGeralCTe_v3.00.xsd"/>
	<xs:complexType name="TCTeConsultaDFe">
		<xs:annotation>
			<xs:documentation>Tipo Pedido de Consulta do Conhecimento de Transporte eletrônico</xs:documentation>
		</xs:annotation>
		<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="xServ" type="TServ" fixed="CONSULTAR">
				<xs:annotation>
					<xs:documentation>Serviço Solicitado</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="chCTe" type="TChNFe">
				<xs:annotation>
					<xs:documentation>Chaves de acesso da CT-e, compostas por: UF do emitente, AAMM da emissão da CT-e, CNPJ do emitente, modelo, série e número da CT-e e código numérico + DV.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="versao" use="required">
			<xs:simpleType>
				<xs:restriction base="TVerCTeConsultaDFe"/>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="TRetCTeConsultaDFe">
		<xs:annotation>
			<xs:documentation>Tipo Retorno de Pedido de Consulta do Conhecimento de Transporte eletrônico</xs:documentation>
		</xs:annotation>
		<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 processou a consulta do CT-e</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="cStat" type="TStat">
				<xs:annotation>
					<xs:documentation>Código do status da consulta do CT-e</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="xMotivo" type="TMotivo">
				<xs:annotation>
					<xs:documentation>Descrição literal do status da consulta do CT-e</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CTeDFe" type="TCTeDFe" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="versao" type="TVerCTeConsultaDFe" use="required"/>
	</xs:complexType>
	<xs:complexType name="TCTeDFe">
		<xs:annotation>
			<xs:documentation>Tipo Documento Fiscal Eletrônico CT-e</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="procCTe">
				<xs:complexType>
					<xs:sequence minOccurs="2" maxOccurs="2">
						<xs:any processContents="skip">
							<xs:annotation>
								<xs:documentation>Autorização de Uso do CT-e</xs:documentation>
							</xs:annotation>
						</xs:any>
					</xs:sequence>
					<xs:attribute name="versao" use="required">
						<xs:annotation>
							<xs:documentation>Versão do proc</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:whiteSpace value="preserve"/>
								<xs:enumeration value="1.03"/>
								<xs:enumeration value="1.04"/>
								<xs:enumeration value="2.00"/>
								<xs:enumeration value="3.00"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="ipTransmissor" type="TIPv4" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="procCancCTe" minOccurs="0">
				<xs:complexType>
					<xs:sequence minOccurs="2" maxOccurs="2">
						<xs:any processContents="skip">
							<xs:annotation>
								<xs:documentation>Solicitação de Cancelamento do CT-e</xs:documentation>
							</xs:annotation>
						</xs:any>
					</xs:sequence>
					<xs:attribute name="versao" use="required">
						<xs:annotation>
							<xs:documentation>Versão do procCancCTe</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:whiteSpace value="preserve"/>
								<xs:enumeration value="1.03"/>
								<xs:enumeration value="1.04"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="ipTransmissor" type="TIPv4" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="procEventoCTe" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence minOccurs="2" maxOccurs="2">
						<xs:any processContents="skip">
							<xs:annotation>
								<xs:documentation>Demais eventos vinculados ao CT-e</xs:documentation>
							</xs:annotation>
						</xs:any>
					</xs:sequence>
					<xs:attribute name="versao" use="required">
						<xs:annotation>
							<xs:documentation>Versão do procEventoCTe</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:whiteSpace value="preserve"/>
								<xs:enumeration value="1.04"/>
								<xs:enumeration value="2.00"/>
								<xs:enumeration value="3.00"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="ipTransmissor" type="TIPv4" use="optional"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="TVerCTeConsultaDFe">
		<xs:annotation>
			<xs:documentation> Tipo Versão do Consulta DFe de CT-e - 1.00</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="1\.00"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
