<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.portalfiscal.inf.br/cte" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.portalfiscal.inf.br/cte" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:include schemaLocation="tiposGeralCTe_v2.00.xsd"/>
	<xs:include schemaLocation="cteTiposBasico_v2.00.xsd"/>
	<xs:simpleType name="TRNTRC">
		<xs:annotation>
			<xs:documentation>Tipo RNTRC - Registro Nacional Transportadores Rodoviários de Carga</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:pattern value="[0-9]{8}|ISENTO"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TPlaca">
		<xs:annotation>
			<xs:documentation>Tipo Placa </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:pattern value="[A-Z]{3}(([1-9]\d{3})|(0[1-9]\d{2})|(00[1-9]\d)|(000[1-9]))"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TCIOT">
		<xs:annotation>
			<xs:documentation>Tipo CIOT - Código Identificador da Operação de Transporte</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:whiteSpace value="preserve"/>
			<xs:pattern value="[0-9]{12}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="rodo">
		<xs:annotation>
			<xs:documentation>Informações do modal Rodoviário</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="RNTRC">
					<xs:annotation>
						<xs:documentation>Registro Nacional de Transportadores Rodoviários de Carga</xs:documentation>
						<xs:documentation>Registro obrigatório do emitente do CT-e junto à ANTT para exercer a atividade de transportador rodoviário de cargas por conta de terceiros e mediante remuneração.
						</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="TRNTRC"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="dPrev" type="TData">
					<xs:annotation>
						<xs:documentation>Data prevista para entrega da carga no Recebedor</xs:documentation>
						<xs:documentation>Formato AAAA-MM-DD</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="lota">
					<xs:annotation>
						<xs:documentation>Indicador de Lotação
</xs:documentation>
						<xs:documentation>Preencher com: 0 - Não; 1 - Sim 
						Será lotação quando houver um único conhecimento de transporte por veículo, ou combinação veicular, e por viagem</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:whiteSpace value="preserve"/>
							<xs:enumeration value="0"/>
							<xs:enumeration value="1"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="CIOT" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Código Identificador da Operação de Transporte</xs:documentation>
						<xs:documentation>Também Conhecido como conta frete</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="TCIOT"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="occ" minOccurs="0" maxOccurs="10">
					<xs:annotation>
						<xs:documentation>Ordens de Coleta associados</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="serie" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Série da OCC</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TString">
										<xs:minLength value="1"/>
										<xs:maxLength value="3"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="nOcc">
								<xs:annotation>
									<xs:documentation>Número da Ordem de coleta</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:pattern value="[1-9]{1}[0-9]{0,5}"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="dEmi" type="TData">
								<xs:annotation>
									<xs:documentation>Data de emissão da ordem de coleta</xs:documentation>
									<xs:documentation>Formato AAAA-MM-DD</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="emiOcc">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="CNPJ" type="TCnpj">
											<xs:annotation>
												<xs:documentation>Número do CNPJ</xs:documentation>
												<xs:documentation>Informar os zeros não significativos.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:element name="cInt" minOccurs="0">
											<xs:annotation>
												<xs:documentation>Código interno de uso da transportadora</xs:documentation>
												<xs:documentation>Uso intermo das transportadoras.</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="TString">
													<xs:minLength value="1"/>
													<xs:maxLength value="10"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
										<xs:element name="IE" type="TIe">
											<xs:annotation>
												<xs:documentation>Inscrição Estadual</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:element name="UF" type="TUf">
											<xs:annotation>
												<xs:documentation>Sigla da UF</xs:documentation>
												<xs:documentation>Informar EX para operações com o exterior.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:element name="fone" type="TFone" minOccurs="0">
											<xs:annotation>
												<xs:documentation>Telefone</xs:documentation>
											</xs:annotation>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="valePed" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Informações de Vale Pedágio</xs:documentation>
						<xs:documentation>Outras informações sobre Vale-Pedágio obrigatório que não tenham campos específicos devem ser informadas no campo de observações gerais de uso livre pelo contribuinte, visando atender as determinações legais vigentes.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CNPJForn">
								<xs:annotation>
									<xs:documentation>CNPJ da empresa fornecedora do Vale-Pedágio</xs:documentation>
									<xs:documentation>- CNPJ da Empresa Fornecedora do Vale-Pedágio, ou seja, empresa que fornece ao Responsável pelo Pagamento do Vale-Pedágio os dispositivos do Vale-Pedágio.
									- Informar os zeros não significativos.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TCnpj"/>
								</xs:simpleType>
							</xs:element>
							<xs:element name="nCompra">
								<xs:annotation>
									<xs:documentation>Número do comprovante de compra</xs:documentation>
									<xs:documentation>Número de ordem do comprovante de compra do Vale-Pedágio fornecido para cada veículo ou combinação veicular, por viagem.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:pattern value="[0-9]{1,20}"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="CNPJPg" type="TCnpjOpc" minOccurs="0">
								<xs:annotation>
									<xs:documentation>CNPJ do responsável pelo pagamento do Vale-Pedágio</xs:documentation>
									<xs:documentation>- responsável pelo pagamento do Vale Pedágio. Informar somente quando o responsável não for o emitente do CT-e.
									- Informar os zeros não significativos.</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="vValePed" type="TDec_1302">
								<xs:annotation>
									<xs:documentation>Valor do Vale-Pedagio</xs:documentation>
									<xs:documentation>Número de ordem do comprovante de compra do Vale-Pedágio fornecido para cada veículo ou combinação veicular, por viagem.</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="veic" minOccurs="0" maxOccurs="4">
					<xs:annotation>
						<xs:documentation>Dados dos Veículos</xs:documentation>
						<xs:documentation>Um CT-e poderá ter vários veículos associados, ex.: cavalo + reboque.
						Só preenchido em CT-e rodoviário de lotação.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="cInt" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Código interno do veículo </xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TString">
										<xs:minLength value="1"/>
										<xs:maxLength value="10"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="RENAVAM">
								<xs:annotation>
									<xs:documentation>RENAVAM do veículo </xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TString">
										<xs:minLength value="9"/>
										<xs:maxLength value="11"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="placa">
								<xs:annotation>
									<xs:documentation>Placa do veículo </xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TPlaca"/>
								</xs:simpleType>
							</xs:element>
							<xs:element name="tara">
								<xs:annotation>
									<xs:documentation>Tara em KG</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:pattern value="0|[1-9]{1}[0-9]{0,5}"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="capKG">
								<xs:annotation>
									<xs:documentation>Capacidade em KG</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:pattern value="0|[1-9]{1}[0-9]{0,5}"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="capM3">
								<xs:annotation>
									<xs:documentation>Capacidade em M3</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:pattern value="0|[1-9]{1}[0-9]{0,2}"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="tpProp">
								<xs:annotation>
									<xs:documentation>Tipo de Propriedade de veículo</xs:documentation>
									<xs:documentation>Preencher com: 
									P- Próprio;
									T- terceiro.
									Será próprio quando o proprietário, co-proprietário ou arrendatário do veículo for o  Emitente do CT-e, caso contrário será caracterizado como  de propriedade de Terceiro
									</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:enumeration value="P"/>
										<xs:enumeration value="T"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="tpVeic">
								<xs:annotation>
									<xs:documentation>Tipo de veículo</xs:documentation>
									<xs:documentation>Preencher com: 0-Tração; 1-Reboque</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:enumeration value="0"/>
										<xs:enumeration value="1"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="tpRod">
								<xs:annotation>
									<xs:documentation>Tipo de Rodado</xs:documentation>
									<xs:documentation>Preencher com:
									00 - não aplicável;
									01 - Truck;
									02 - Toco;
									03 - Cavalo Mecânico;
									04 - VAN;
									05 - Utilitário;
									06 - Outros.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:enumeration value="00"/>
										<xs:enumeration value="01"/>
										<xs:enumeration value="02"/>
										<xs:enumeration value="03"/>
										<xs:enumeration value="04"/>
										<xs:enumeration value="05"/>
										<xs:enumeration value="06"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="tpCar">
								<xs:annotation>
									<xs:documentation>Tipo de Carroceria</xs:documentation>
									<xs:documentation>Preencher com:
									00 - não aplicável;
									01 - Aberta;
									02 - Fechada/Baú;
									03 - Granelera;
									04 - Porta Container;
									05 - Sider</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:whiteSpace value="preserve"/>
										<xs:enumeration value="00"/>
										<xs:enumeration value="01"/>
										<xs:enumeration value="02"/>
										<xs:enumeration value="03"/>
										<xs:enumeration value="04"/>
										<xs:enumeration value="05"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="UF" type="TUf">
								<xs:annotation>
									<xs:documentation>UF em que veículo está licenciado</xs:documentation>
									<xs:documentation>Sigla da UF de licenciamento do veículo.</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="prop" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Proprietários do Veículo.
									Só preenchido quando o veículo não pertencer à empresa emitente do CT-e</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:choice>
											<xs:element name="CPF" type="TCpf">
												<xs:annotation>
													<xs:documentation>Número do CPF</xs:documentation>
													<xs:documentation>Informar os zeros não significativos.</xs:documentation>
												</xs:annotation>
											</xs:element>
											<xs:element name="CNPJ" type="TCnpjOpc">
												<xs:annotation>
													<xs:documentation>Número do CNPJ</xs:documentation>
													<xs:documentation>Informar os zeros não significativos.</xs:documentation>
												</xs:annotation>
											</xs:element>
										</xs:choice>
										<xs:element name="RNTRC" type="TRNTRC">
											<xs:annotation>
												<xs:documentation>Registro Nacional dos Transportadores Rodoviários de Carga</xs:documentation>
												<xs:documentation>Registro obrigatório do proprietário, co-proprietário ou arrendatário do veículo junto à ANTT para exercer a atividade de transportador rodoviário de cargas por conta de terceiros e mediante remuneração.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:element name="xNome">
											<xs:annotation>
												<xs:documentation>Razão Social ou Nome do proprietário</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="TString">
													<xs:maxLength value="60"/>
													<xs:minLength value="2"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
										<xs:sequence minOccurs="0">
											<xs:element name="IE">
												<xs:annotation>
													<xs:documentation>Inscrição Estadual</xs:documentation>
												</xs:annotation>
												<xs:simpleType>
													<xs:restriction base="TIeDest"/>
												</xs:simpleType>
											</xs:element>
											<xs:element name="UF" type="TUf">
												<xs:annotation>
													<xs:documentation>UF</xs:documentation>
												</xs:annotation>
											</xs:element>
										</xs:sequence>
										<xs:element name="tpProp">
											<xs:annotation>
												<xs:documentation>Tipo Proprietário</xs:documentation>
												<xs:documentation>Preencher com:
												0-TAC – Agregado;
												1-TAC Independente; ou 
												2 – Outros.</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="xs:string">
													<xs:whiteSpace value="preserve"/>
													<xs:enumeration value="0"/>
													<xs:enumeration value="1"/>
													<xs:enumeration value="2"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="lacRodo" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Lacres</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="nLacre">
								<xs:annotation>
									<xs:documentation>Número do Lacre</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TString">
										<xs:minLength value="1"/>
										<xs:maxLength value="20"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="moto" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Informações do(s) Motorista(s)</xs:documentation>
						<xs:documentation>Só preenchido em CT-e rodoviário de lotação</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="xNome">
								<xs:annotation>
									<xs:documentation>Nome do Motorista</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="TString">
										<xs:maxLength value="60"/>
										<xs:minLength value="2"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="CPF" type="TCpf">
								<xs:annotation>
									<xs:documentation>CPF do Motorista</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
