<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
		targetNamespace="http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd" 
		xmlns="http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd" 
		xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" 
		attributeFormDefault="unqualified" 
		elementFormDefault="qualified">
  <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212.xsd" />
  <!-- definition of simple elements -->
  <xsd:simpleType name="tsNumeroNfse">
    <xsd:restriction base="xsd:nonNegativeInteger">
      <xsd:totalDigits value="15" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoVerificacao">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="9" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsStatusRps">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsStatusNfse">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNaturezaOperacao">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2|3|4|5|6|7|8" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsRegimeEspecialTributacao">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2|3|4|5|6" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsSimNao">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNumeroRps">
    <xsd:restriction base="xsd:nonNegativeInteger">
      <xsd:totalDigits value="15" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsSerieRps">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="5" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsTipoRps">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2|3" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsOutrasInformacoes">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="255" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsValor">
    <xsd:restriction base="xsd:decimal">
      <xsd:totalDigits value="17" />
      <xsd:fractionDigits value="2" />
      <xsd:minInclusive value="0" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsItemListaServico">
    <xsd:restriction base="xsd:string">
      <xsd:length value="6" fixed="true" />
      <xsd:whiteSpace value="collapse" />
      <xsd:pattern value="\d{6}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoCnae">
    <xsd:restriction base="xsd:int">
      <xsd:totalDigits value="7" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoTributacao">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="20" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsAliquota">
    <xsd:restriction base="xsd:decimal">
      <xsd:totalDigits value="5" />
      <xsd:fractionDigits value="4" />
      <xsd:minInclusive value="0" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsDiscriminacao">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="2000" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoMunicipioIbge">
    <xsd:restriction base="xsd:int">
      <xsd:totalDigits value="7" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsInscricaoMunicipal">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="15" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsRazaoSocial">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="115" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNomeFantasia">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="60" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCnpj">
    <xsd:restriction base="xsd:string">
      <xsd:length value="14" fixed="true" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsEndereco">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="125" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNumeroEndereco">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="10" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsComplementoEndereco">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="60" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsBairro">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="60" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsUf">
    <xsd:restriction base="xsd:string">
      <xsd:length value="2" fixed="true" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCep">
    <xsd:restriction base="xsd:int">
      <xsd:totalDigits value="8" fixed="true" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsEmail">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="80" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsTelefone">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="11" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCpf">
    <xsd:restriction base="xsd:string">
      <xsd:length value="11" fixed="true" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsIndicacaoCpfCnpj">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2|3" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoObra">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="15" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsArt">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="15" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNumeroLote">
    <xsd:restriction base="xsd:nonNegativeInteger">
      <xsd:totalDigits value="15" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNumeroProtocolo">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsSituacaoLoteRps">
    <xsd:restriction base="xsd:byte">
      <xsd:pattern value="1|2|3|4" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsQuantidadeRps">
    <xsd:restriction base="xsd:int" />
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoMensagemAlerta">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="4" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsDescricaoMensagemAlerta">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="200" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoCancelamentoNfse">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="4" />
      <xsd:minLength value="1" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsIdTag">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="255" />
    </xsd:restriction>
  </xsd:simpleType>
  <!-- ALTERADO POR NATAL
	linha original : Substituicao dos tipos xsd:date e xsd: datetime pelos tipos criados tsdata e tsdatahora que sao strings
	motivo: O SQL 2005 exige o caracter Z de controle de timezone. Quando migrar para 2008 voltar para o tipo nativo
	-->
  <xsd:simpleType name="tsDataHora">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="20" />
      <xsd:minLength value="19" />
      <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsData">
    <xsd:annotation>
      <xsd:documentation>Tipo data no formato AAAA-MM-DD</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="(((20(([02468][048])|([13579][26]))-02-29))|(20[0-9][0-9])-((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30)))))"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- ========================================================= -->
  <!-- Campos novos 11/2025            -->
  <!-- ========================================================= -->
  <xsd:simpleType name="tsDesc150">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="150"/>
      <xsd:whiteSpace value="collapse"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsDec2V2">
    <xsd:annotation>
      <xsd:documentation>Valor decimal com 1 ou 2 dígitos mais 2 casas decimais</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,1}(\.[0-9]{2})?"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsDec3V2">
    <xsd:annotation>
      <xsd:documentation>Valor decimal com 1 a 3 dígitos mais 2 casas decimais</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,2}(\.[0-9]{2})?"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoPais">
    <xsd:restriction base="xsd:string">
      <xsd:length value="2"/>
      <xsd:whiteSpace value="collapse"/>
      <xsd:pattern value="[A-Za-z]{2}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoPostal">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="11"/>
      <xsd:whiteSpace value="collapse"/>
      <xsd:pattern value="[A-Za-z0-9\- ]+"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCidade">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="60"/>
      <xsd:whiteSpace value="collapse"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsEstadoRegiaoProvincia">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="60"/>
      <xsd:whiteSpace value="collapse"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodigoNbs">
    <xsd:restriction base="xsd:string">
      <xsd:length value="9"/>
      <xsd:whiteSpace value="collapse"/>
      <xsd:pattern value="\d{9}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsNIF">
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:minLength value="1"/>
      <xsd:maxLength value="40"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodNaoNIF">
    <xsd:annotation>
      <xsd:documentation>
        Motivo para não informação do NIF:
        0 - Não informado na nota de origem;
        1 - Dispensado do NIF;
        2 - Não exigência do NIF;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="0"/>
      <xsd:enumeration value="1"/>
      <xsd:enumeration value="2"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsFinNFSe">
    <xsd:annotation>
      <xsd:documentation>
        Indicador da finalidade da emissão de NFS-e:
        0 - NFS-e regular;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="0"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsIndFinal">
    <xsd:annotation>
      <xsd:documentation>
        Indica operação de uso ou consumo pessoal (art. 57):
        0 - Não;
        1 - Sim;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="0"/>
      <xsd:enumeration value="1"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodIndOp">
    <xsd:annotation>
      <xsd:documentation>
        Código indicador da operação de fornecimento, conforme tabela "código indicador de operação"
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="[0-9]{6}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsTpOper">
    <xsd:annotation>
      <xsd:documentation>
        Tipo de Operação com Entes Governamentais ou outros serviços sobre bens imóveis:
        1 – Fornecimento com pagamento posterior;
        2 - Recebimento do pagamento com fornecimento já realizado;
        3 – Fornecimento com pagamento já realizado;
        4 – Recebimento do pagamento com fornecimento posterior;
        5 – Fornecimento e recebimento do pagamento concomitantes;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="1"/>
      <xsd:enumeration value="2"/>
      <xsd:enumeration value="3"/>
      <xsd:enumeration value="4"/>
      <xsd:enumeration value="5"/>
    </xsd:restriction>
  </xsd:simpleType>  
  <xsd:simpleType name="tsChaveNFSeNacional">
    <xsd:annotation>
      <xsd:documentation>Chave da Nota Fiscal de Serviço Eletrônica Nacional</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:maxLength value="50"/>
      <xsd:pattern value="[0-9]{50}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsTpEnteGov">
    <xsd:annotation>
      <xsd:documentation>
        Tipo de ente governamental
        Para administração pública direta e suas autarquias e fundações:
        1 - União;
        2 - Estado;
        3 - Distrito Federal;
        4 - Município;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="1"/>
      <xsd:enumeration value="2"/>
      <xsd:enumeration value="3"/>
      <xsd:enumeration value="4"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsIndDest">
    <xsd:annotation>
      <xsd:documentation>
        A respeito do Destinatário dos serviços:
        0 – o destinatário é o próprio tomador/adquirente identificado na NFS-e (tomador = adquirente = destinatário);
        1 – o destinatário não é o próprio adquirente, podendo ser outra pessoa, física ou jurídica (ou equiparada), ou um estabelecimento diferente do indicado como tomador (tomador = adquirente ≠ destinatário);
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="0"/>
      <xsd:enumeration value="1"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsInscImobFisc">
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:minLength value="1"/>
      <xsd:maxLength value="30"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodCIB">
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:length value="8"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsTipoChaveDFe">
    <xsd:annotation>
      <xsd:documentation>
        Documento fiscal a que se refere a chaveDfe que seja um dos documentos do Repositório Nacional:
        1 - NFS-e;
        2 - NF-e;
        3 - CT-e;
        9 - Outro;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="1"/>
      <xsd:enumeration value="2"/>
      <xsd:enumeration value="3"/>
      <xsd:enumeration value="9"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsTpReeRepRes">
    <xsd:annotation>
      <xsd:documentation>
        Tipo de valor incluído neste documento, recebido por motivo de estarem relacionadas a operações de terceiros,
        objeto de reembolso, repasse ou ressarcimento pelo recebedor, já tributados e aqui referenciados
        01 - Repasse de remuneração por intermediação de imóveis a demais corretores envolvidos na operação;
        02 - Repasse de valores a fornecedor relativo a fornecimento intermediado por agência de turismo;
        03 - Reembolso ou ressarcimento recebido por agência de propaganda e publicidade por valores pagos relativos 
             a serviços de produção externa por conta e ordem de terceiro;
        04 - Reembolso ou ressarcimento recebido por agência de propaganda e publicidade por valores pagos relativos 
             a serviços de mídia por conta e ordem de terceiro;
        99 - Outros reembolsos ou ressarcimentos recebidos por valores pagos relativos a operações por conta e ordem de terceiro;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:enumeration value="01"/>
      <xsd:enumeration value="02"/>
      <xsd:enumeration value="03"/>
      <xsd:enumeration value="04"/>
      <xsd:enumeration value="99"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodSitTrib">
    <xsd:annotation>
      <xsd:documentation>
        Código de Situação Tributária do IBS e da CBS
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="[0-9]{3}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodClassTrib">
    <xsd:annotation>
      <xsd:documentation>
        Código de Classificação Tributária do IBS e da CBS
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="[0-9]{6}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="tsCodCredPres">
    <xsd:annotation>
      <xsd:documentation>
        Código e classificação do crédito presumido: IBS e CBS.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:whiteSpace value="preserve"/>
      <xsd:pattern value="[0-9]{2}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- definition of complex elements-->
  <xsd:complexType name="tcCpfCnpj">
    <xsd:choice>
      <xsd:element name="Cpf" type="tsCpf" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1" />
    </xsd:choice>
  </xsd:complexType>
  <xsd:complexType name="tcCpfCnpjNIF">
    <xsd:choice>
      <xsd:element name="Cpf" type="tsCpf" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1" />
      <xsd:element name="NIF" type="tsNIF" minOccurs="1" maxOccurs="1" />
      <xsd:element name="cNaoNif" type="tsCodNaoNIF" minOccurs="1" maxOccurs="1" />
    </xsd:choice>
  </xsd:complexType>
  <xsd:complexType name="tcEndereco">
    <xsd:sequence>
      <xsd:element name="Endereco" type="tsEndereco" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Numero" type="tsNumeroEndereco" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Complemento" type="tsComplementoEndereco" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Bairro" type="tsBairro" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Uf" type="tsUf" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Cep" type="tsCep" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PaisExterior" type="tsCodigoPais" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CodigoPostalExterior" type="tsCodigoPostal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CidadeExterior" type="tsCidade" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EstadoRegiaoProvinciaExterior" type="tsEstadoRegiaoProvincia" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcContato">
    <xsd:sequence>
      <xsd:element name="Telefone" type="tsTelefone" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Email" type="tsEmail" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcIdentificacaoOrgaoGerador">
    <xsd:sequence>
      <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Uf" type="tsUf" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcIdentificacaoRps">
    <xsd:sequence>
      <xsd:element name="Numero" type="tsNumeroRps" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Serie" type="tsSerieRps" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Tipo" type="tsTipoRps" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcIdentificacaoPrestador">
    <xsd:sequence>
      <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1" />
      <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcIdentificacaoTomador">
    <xsd:sequence>
      <xsd:element name="CpfCnpj" type="tcCpfCnpjNIF" minOccurs="0" maxOccurs="1" />
      <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcDadosTomador">
    <xsd:sequence>
      <xsd:element name="IdentificacaoTomador" type="tcIdentificacaoTomador" minOccurs="0" maxOccurs="1" />
      <xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Endereco" type="tcEndereco" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Contato" type="tcContato" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcIdentificacaoIntermediarioServico">
    <xsd:sequence>
      <xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CpfCnpj" type="tcCpfCnpjNIF" minOccurs="1" maxOccurs="1" />
      <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Endereco" type="tcEndereco" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Contato" type="tcContato" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcValores">
    <xsd:sequence>
      <xsd:element name="ValorServicos" type="tsValor" minOccurs="1" maxOccurs="1" />
      <xsd:element name="ValorDeducoes" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorPis" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorCofins" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorInss" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorIr" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorCsll" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="IssRetido" type="tsSimNao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="ValorIss" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorIssRetido" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="OutrasRetencoes" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="BaseCalculo" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Aliquota" type="tsAliquota" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ValorLiquidoNfse" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="DescontoIncondicionado" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="DescontoCondicionado" type="tsValor" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcDadosServico">
    <xsd:sequence>
      <xsd:element name="Valores" type="tcValores" minOccurs="1" maxOccurs="1" />
      <xsd:element name="ItemListaServico" type="tsItemListaServico" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CodigoCnae" type="tsCodigoCnae" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CodigoTributacaoMunicipio" type="tsCodigoTributacao" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Discriminacao" type="tsDiscriminacao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PaisExterior" type="tsCodigoPais" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CodigoNbs" type="tsCodigoNbs" minOccurs="1" maxOccurs="1" />
      <xsd:element name="IBSCBS" type="tcIBSCBS" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcDadosConstrucaoCivil">
    <xsd:sequence>
      <xsd:element name="CodigoObra" type="tsCodigoObra" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Art" type="tsArt" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcDadosPrestador">
    <xsd:sequence>
      <xsd:element name="IdentificacaoPrestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
      <xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="1" maxOccurs="1" />
      <xsd:element name="NomeFantasia" type="tsNomeFantasia" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Endereco" type="tcEndereco" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Contato" type="tcContato" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcInfRps">
    <xsd:sequence>
      <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1" />
      <xsd:element name="DataEmissao" type="tsDataHora" minOccurs="1" maxOccurs="1" />
      <xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0" maxOccurs="1" />
      <xsd:element name="OptanteSimplesNacional" type="tsSimNao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="IncentivadorCultural" type="tsSimNao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Status" type="tsStatusRps" minOccurs="1" maxOccurs="1" />
      <xsd:element name="RpsSubstituido" type="tcIdentificacaoRps" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Servico" type="tcDadosServico" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Tomador" type="tcDadosTomador" minOccurs="0" maxOccurs="1" />
      <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1" />
	<!-- ALTERADO POR NATAL
	linha original : <xsd:element name="ContrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0" maxOccurs="1" />
	motivo: O nome ConstrucaoCivil estava escrito errado
	-->
      <xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>

    <!-- ALTERADO POR NATAL
	linha original : <xsd:attribute name="id" type="tsIdTag" />
	motivo: Todos os campos iniciam com letra maiuscula, apenas o id estava com minuscula
	-->
	 <xsd:attribute name="Id" type="tsIdTag" />

  </xsd:complexType>
  <xsd:complexType name="tcRps">
    <xsd:sequence>
      <xsd:element name="InfRps" type="tcInfRps" minOccurs="1" maxOccurs="1" />
      <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcIdentificacaoNfse">
    <xsd:sequence>
      <xsd:element name="Numero" type="tsNumeroNfse" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1" />
      <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcInfNfse">
    <xsd:sequence>
      <xsd:element name="Numero" type="tsNumeroNfse" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CodigoVerificacao" type="tsCodigoVerificacao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="DataEmissao" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
      <xsd:element name="IdentificacaoRps" minOccurs="0" type="tcIdentificacaoRps" maxOccurs="1" />
      <xsd:element name="DataEmissaoRps" type="xsd:date" minOccurs="0" maxOccurs="1" />
      <xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0" maxOccurs="1" />
      <xsd:element name="OptanteSimplesNacional" type="tsSimNao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="IncentivadorCultural" type="tsSimNao" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Competencia" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
      <xsd:element name="NfseSubstituida" type="tsNumeroNfse" minOccurs="0" maxOccurs="1" />
      <xsd:element name="OutrasInformacoes" type="tsOutrasInformacoes" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Servico" type="tcDadosServico" minOccurs="1" maxOccurs="1" />
      <xsd:element name="ValorCredito" type="tsValor" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PrestadorServico" type="tcDadosPrestador" minOccurs="1" maxOccurs="1" />
      <xsd:element name="TomadorServico" type="tcDadosTomador" minOccurs="0" maxOccurs="1" />
      <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1" />
      <xsd:element name="OrgaoGerador" type="tcIdentificacaoOrgaoGerador" minOccurs="1" maxOccurs="1" />
	<!-- ALTERADO POR NATAL
	linha original : <xsd:element name="ContrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0" maxOccurs="1" />
	motivo: O nome ConstrucaoCivil estava escrito errado
	-->
      <xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0" maxOccurs="1" />
	</xsd:sequence>
	<!-- ALTERADO POR NATAL
	linha original : <xsd:attribute name="id" type="tsIdTag" />
	motivo: Todos os campos iniciam com letra maiuscula, apenas o id estava com minuscula
	-->
	 <xsd:attribute name="Id" type="tsIdTag" />
    
  </xsd:complexType>
  <xsd:complexType name="tcNfse">
    <xsd:sequence>
      <xsd:element name="InfNfse" type="tcInfNfse" minOccurs="1" maxOccurs="1" />
      <xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="2" />
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO PARA GRUPO DE NFS-E REFERENCIADAS-->
  <xsd:complexType name="tcInfoRefNFSe">
    <xsd:sequence>
      <xsd:element name="refNFSe" type="tsChaveNFSeNacional" maxOccurs="99">
        <xsd:annotation>
          <xsd:documentation>
            Chave da NFS-e referenciada
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>  
  <!--TIPO COMPLEXO INFORMAÇÕES RELATIVAS AO DESTINATÁRIO DO SERVIÇO IBSCBS-->
  <xsd:complexType name="tcInfoDest">
    <xsd:sequence>
      <xsd:element name="CpfCnpjNIF" type="tcCpfCnpjNIF" minOccurs="0" maxOccurs="1" />
      <xsd:element name="xNome" type="tsDesc150">
        <xsd:annotation>
          <xsd:documentation>
            Nome / Nome Empresarial do do Destinatário do serviço
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="Endereco" type="tcEndereco" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Contato" type="tcContato" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES RELATIVAS A BENS IMÓVEIS IBSCBS-->
  <xsd:complexType name="tcInfoImovel">
    <xsd:sequence>
      <xsd:element name="inscImobFisc" type="tsInscImobFisc" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Inscrição imobiliária fiscal (código fornecido pela Prefeitura Municipal para a identificação da obra ou para fins de recolhimento do IPTU)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:choice minOccurs="1">
        <xsd:element name="cCIB" type="tsCodCIB">
          <xsd:annotation>
            <xsd:documentation>
              Código do Cadastro Imobiliário Brasileiro - CIB
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CEP" type="tsCep">
          <xsd:annotation>
            <xsd:documentation>Número do CEP</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="end" type="tcEndereco">
          <xsd:annotation>
            <xsd:documentation>
              Grupo de informações do endereço da obra do serviço prestado
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>  
  <!--TIPO COMPLEXO INFORMAÇÕES DE DOCUMENTOS FISCAIS ELETRÔNICOS QUE SE ENCONTRAM NO REPOSITÓRIO NACIONAL-->
  <xsd:complexType name="tcListaDocDFe">
    <xsd:sequence>
      <xsd:element name="tipoChaveDFe" type="tsTipoChaveDFe">
        <xsd:annotation>
          <xsd:documentation>
            Documento fiscal a que se refere a chaveDfe que seja um dos documentos do Repositório Nacional
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="xTipoChaveDFe" type="tsOutrasInformacoes" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Descrição da DF-e a que se refere a chaveDfe que seja um dos documentos do Repositório Nacional
            Deve ser preenchido apenas quando "tipoChaveDFe = 9 (Outro)"
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="chaveDFe" type="tsChaveNFSeNacional">
        <xsd:annotation>
          <xsd:documentation>
            Chave do Documento Fiscal eletrônico do repositório nacional referenciado para os casos de operações já tributadas
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES DE DOCUMENTO FISCAIS, ELETRÔNICOS OU NÃO, QUE NÃO SE ENCONTRAM NO REPOSITÓRIO NACIONAL-->
  <xsd:complexType name="tcListaDocFiscalOutro">
    <xsd:sequence>
      <xsd:element name="cMunDocFiscal" type="tsCodigoMunicipioIbge">
        <xsd:annotation>
          <xsd:documentation>
            Código do município emissor do documento fiscal que não se encontra no repositório nacional
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="nDocFiscal" type="tsOutrasInformacoes">
        <xsd:annotation>
          <xsd:documentation>
            Número do documento fiscal que não se encontra no repositório nacional
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="xDocFiscal" type="tsOutrasInformacoes">
        <xsd:annotation>
          <xsd:documentation>
            Descrição do documento fiscal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES DE DOCUMENTO NÃO FISCAL-->
  <xsd:complexType name="tcListaDocOutro">
    <xsd:sequence>
      <xsd:element name="nDoc" type="tsOutrasInformacoes">
        <xsd:annotation>
          <xsd:documentation>
            Número do documento não fiscal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="xDoc" type="tsOutrasInformacoes">
        <xsd:annotation>
          <xsd:documentation>
            Descrição do documento não fiscal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES DO FORNECEDOR DO DOCUMENTO REFERENCIADO-->
  <xsd:complexType name="tcListaDocFornec">
    <xsd:sequence>
      <xsd:element name="CpfCnpjNIF" type="tcCpfCnpjNIF" minOccurs="1" maxOccurs="1" />
      <xsd:element name="xNome" type="tsDesc150">
        <xsd:annotation>
          <xsd:documentation>
            Nome / Razão Social do do Fornecedor do serviço
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES RELATIVAS AOS DOCUMENTOS REFERENCIADOS NO REEMBOLSO REPASSE OU RESSARCIMENTO IBSCBS-->
  <xsd:complexType name="tcListaDoc">
    <xsd:sequence>
      <xsd:choice>
        <xsd:element name="dFeNacional" type="tcListaDocDFe">
          <xsd:annotation>
            <xsd:documentation>
              Grupo de informações de documentos fiscais eletrônicos que se encontram no repositório nacional
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="docFiscalOutro" type="tcListaDocFiscalOutro">
          <xsd:annotation>
            <xsd:documentation>
              Grupo de informações de documento fiscais, eletrônicos ou não, que não se encontram no repositório nacional
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="docOutro" type="tcListaDocOutro">
          <xsd:annotation>
            <xsd:documentation>
              Grupo de informações de documento não fiscal.
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:choice>
      <xsd:element name="fornec" type="tcListaDocFornec" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações do fornecedor do documento referenciado
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="dtEmiDoc" type="tsData">
        <xsd:annotation>
          <xsd:documentation>
            Data da emissão do documento dedutível
            Ano, mês e dia (AAAA-MM-DD)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="dtCompDoc" type="tsData">
        <xsd:annotation>
          <xsd:documentation>
            Data da competência do documento dedutível
            Ano, mês e dia (AAAA-MM-DD)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="tpReeRepRes" type="tsTpReeRepRes">
        <xsd:annotation>
          <xsd:documentation>
            Tipo de valor incluído neste documento, recebido por motivo de estarem relacionadas a operações de terceiros, 
            objeto de reembolso, repasse ou ressarcimento pelo recebedor, já tributados e aqui referenciados
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="xTpReeRepRes" type="tsDesc150" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Descrição do reembolso ou ressarcimento quando a opção é 
            "99 – Outros reembolsos ou ressarcimentos recebidos por valores pagos relativos a operações por conta e ordem de terceiro"
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vlrReeRepRes" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor monetário (total ou parcial, conforme documento informado) utilizado para não inclusão na base de cálculo 
            do ISS e do IBS e da CBS da NFS-e que está sendo emitida (R$)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES RELATIVAS AOS VALORES DE REEMBOLSO REPASSE OU RESSARCIMENTO IBSCBS-->
  <xsd:complexType name="tcInfoReeRepRes">
    <xsd:sequence>
      <xsd:element name="documentos" type="tcListaDoc" minOccurs="1" maxOccurs="1000">
        <xsd:annotation>
          <xsd:documentation>
            Grupo relativo aos documentos referenciados nos casos de reembolso, repasse e ressarcimento que serão 
            considerados na base de cálculo do ISSQN, do IBS e da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES DA TRIBUTAÇÃO REGULAR-->
  <xsd:complexType name="tcInfoTributosTribRegular">
    <xsd:sequence>
      <xsd:element name="CSTReg" type="tsCodSitTrib">
        <xsd:annotation>
          <xsd:documentation>
            Código de Situação Tributária do IBS e da CBS de tributação regular
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="cClassTribReg" type="tsCodClassTrib">
        <xsd:annotation>
          <xsd:documentation>
            Código da Classificação Tributária do IBS e da CBS de tributação regular
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES RELACIONADAS AO DIFERIMENTO PARA IBS E CBS-->
  <xsd:complexType name="tcInfoTributosDif">
    <xsd:sequence>
      <xsd:element name="pDifUF" type="tsDec3V2">
        <xsd:annotation>
          <xsd:documentation>
            Percentual de diferimento para o IBS estadual
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pDifMun" type="tsDec3V2">
        <xsd:annotation>
          <xsd:documentation>
            Percentual de diferimento para o IBS municipal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pDifCBS" type="tsDec3V2">
        <xsd:annotation>
          <xsd:documentation>
            Percentual de diferimento para a CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>  
  <!--TIPO COMPLEXO INFORMAÇÕES RELACIONADOS AOS TRIBUTOS SITUACAO E CLASSIFICACAO IBSCBS-->
  <xsd:complexType name="tcInfoTributosSitClas">
    <xsd:sequence>
      <xsd:element name="CST" type="tsCodSitTrib">
        <xsd:annotation>
          <xsd:documentation>
            Código de Situação Tributária do IBS e da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="cClassTrib" type="tsCodClassTrib">
        <xsd:annotation>
          <xsd:documentation>
            Código de Classificação Tributária do IBS e da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="cCredPres" type="tsCodCredPres" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Código e Classificação do Crédito Presumido: IBS e CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gTribRegular" type="tcInfoTributosTribRegular" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações da Tributação Regular
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gDif" type="tcInfoTributosDif" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações relacionadas ao diferimento para IBS e CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES RELACIONADOS AOS TRIBUTOS IBSCBS-->
  <xsd:complexType name="tcInfoTributosIBSCBS">
    <xsd:sequence>
      <xsd:element name="gIBSCBS" type="tcInfoTributosSitClas">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações relacionadas ao IBS e à CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO INFORMAÇÕES RELATIVAS AOS VALORES DO SERVIÇO PRESTADO IBSCBS-->
  <xsd:complexType name="tcInfoValoresIBSCBS">
    <xsd:sequence>
      <xsd:element name="gReeRepRes" type="tcInfoReeRepRes" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações relativas a valores incluídos neste documento e recebidos por motivo de estarem relacionadas 
            a operações de terceiros, objeto de reembolso, repasse ou ressarcimento pelo recebedor, já tributados e aqui referenciados
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="trib" type="tcInfoTributosIBSCBS">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações relacionados aos tributos IBS e CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
<!--TIPO COMPLEXO IBS ESTADUAL-->
  <xsd:complexType name="tcValoresIBSCBSUF">
    <xsd:sequence>
      <xsd:element name="pIBSUF" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota da UF para IBS da localidade de incidência parametrizada no sistema
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pRedAliqUF" type="tsDec3V2" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Percentual de redução de alíquota estadual
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pAliqEfetUF" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            pAliqEfetUF = pIBSUF x (1 - pRedAliqUF) x (1 - pRedutor)
            Se pRedAliqUF não for informado na DPS, então pAliqEfetUF é a própria pIBSUF
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO IBS MUNICIPAL-->
  <xsd:complexType name="tcValoresIBSCBSMun">
    <xsd:sequence>
      <xsd:element name="pIBSMun" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota do Município para IBS da localidade de incidência parametrizada no sistema
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pRedAliqMun" type="tsDec3V2" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Percentual de redução de alíquota municipal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pAliqEfetMun" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            pAliqEfetMun = pIBSMun x (1 - pRedAliqMun) x (1 - pRedutor)
            Se pRedAliqMun não for informado na DPS, então pAliqEfetMun é a própria pIBSMun
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO CBS-->
  <xsd:complexType name="tcValoresIBSCBSFed">
    <xsd:sequence>
      <xsd:element name="pCBS" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota da União para CBS parametrizada no sistema
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pRedAliqCBS" type="tsDec3V2" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Percentual da redução de alíquota da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pAliqEfetCBS" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            pAliqEfetCBS = pCBS x (1 - pRedAliqCBS) x (1 - pRedutor)
            Se pRedAliqCBS não for informado na DPS, então pAliqEfetCBS é a própria pCBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DOS VALORES BRUTOS IBSCBS-->
  <xsd:complexType name="tcValoresIBSCBS">
    <xsd:sequence>
      <xsd:element name="vBC" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor da base de cálculo (BC) do IBS/CBS antes das reduções para cálculo do tributo bruto
            vBC = vServ - descIncond – vCalcReeRepRes – vISSQN – vPIS - vCOFINS (até 2026) ou
            vBC = vServ - descIncond – vCalcReeRepRes – vISSQN (até 2032)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vCalcReeRepRes" type="tsValor" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Valor monetário (R$) total relativo ao fornecimento próprio de bens materiais ou relacionados a operações de terceiros, 
            objeto de reembolso, repasse ou ressarcimento pelo recebedor, já tributados e aqui referenciados e que não integram 
            da base de cálculo (BC) do ISSQN, do IBS e da CBS.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="uf" type="tcValoresIBSCBSUF">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de Informações relativas aos valores do IBS Estadual
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="mun" type="tcValoresIBSCBSMun">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de Informações relativas aos valores do IBS Municipal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="fed" type="tcValoresIBSCBSFed">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de Informações relativas aos valores da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES CREDITO PRESUMIDO IBS-->
  <xsd:complexType name="tcTotalIBSCredPres">
    <xsd:sequence>
      <xsd:element name="pCredPresIBS" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota do crédito presumido para o IBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vCredPresIBS" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor do Crédito Presumido para o IBS
            vCredPresIBS = vBC x pCredPresIBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES IBS ESTADUAL-->
  <xsd:complexType name="tcTotalIBSUF">
    <xsd:sequence>
      <xsd:element name="vDifUF" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Total do Diferimento do IBS estadual
            vDifUF = vIBSUF x pDifUF
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vIBSUF" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Total valor do IBS estadual
            vIBSUF = vBC x (pIBSUF ou pAliqEfetUF)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES IBS MUNICIPAL-->
  <xsd:complexType name="tcTotalIBSMun">
    <xsd:sequence>
      <xsd:element name="vDifMun" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Total do Diferimento do IBS municipal
            vDifMun = vIBSMun x pDifMun
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vIBSMun" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Total valor do IBS municipal
            vIBSMun = vBC x (pIBSMun ou pAliqEfetMun)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES IBS-->
  <xsd:complexType name="tcTotalIBS">
    <xsd:sequence>
      <xsd:element name="vIBSTot" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor total do IBS.
            vIBSTot = vIBSUF + vIBSMun
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gIBSCredPres" type="tcTotalIBSCredPres" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores referentes ao crédito presumido para IBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gIBSUFTot" type="tcTotalIBSUF">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores referentes ao IBS Estadual
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gIBSMunTot" type="tcTotalIBSMun">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores referentes ao IBS Municipal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES CREDITO PRESUMIDO CBS-->
  <xsd:complexType name="tcTotalCBSCredPres">
    <xsd:sequence>
      <xsd:element name="pCredPresCBS" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota do crédito presumido para a CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vCredPresCBS" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor do Crédito Presumido da CBS
            vCredPresCBS = vBC x pCredPresCBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES CBS-->
  <xsd:complexType name="tcTotalCBS">
    <xsd:sequence>
      <xsd:element name="gCBSCredPres" type="tcTotalCBSCredPres" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores referentes ao crédito presumido para CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vDifCBS" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Total do Diferimento CBS
            vDifCBS = vCBS x pDifCBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vCBS" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Total valor da CBS da União
            vCBS = vBC x (pCBS ou pAliqEfetCBS)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES TRIBUTAÇÃO REGULAR-->
  <xsd:complexType name="tcTotalTribRegular">
    <xsd:sequence>
      <xsd:element name="pAliqEfeRegIBSUF" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota efetiva de tributação regular do IBS estadual
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vTribRegIBSUF" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor da tributação regular do IBS estadual
            vTribRegIBSUF = vBC x pAliqEfeRegIBSUF
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pAliqEfeRegIBSMun" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota efetiva de tributação regular do IBS municipal
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vTribRegIBSMun" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor da tributação regular do IBS municipal
            vTribRegIBSMun = vBC x pAliqEfeRegIBSMun
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pAliqEfeRegCBS" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota efetiva de tributação regular da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vTribRegCBS" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor da tributação regular da CBS
            vTribRegCBS = vBC x pAliqEfeRegCBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES DOS VALORES IBSCBS EM COMPRAS GOVERNAMENTAIS-->
  <xsd:complexType name="tcTotalTribCompraGov">
    <xsd:sequence>
      <xsd:element name="pIBSUF" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota do IBS de competência do Estado
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vIBSUF" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor do Tributo do IBS da UF calculado
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pIBSMun" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota do IBS de competência do Município
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vIBSMun" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor do Tributo do IBS do Município calculado
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pCBS" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Alíquota da CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="vCBS" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor do Tributo da CBS calculado
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO DE TOTALIZADORES IBSCBS-->
  <xsd:complexType name="tcTotalCIBS">
    <xsd:sequence>
      <xsd:element name="vTotNF" type="tsValor">
        <xsd:annotation>
          <xsd:documentation>
            Valor Total da NF considerando os impostos por fora: IBS e CBS
            O IBS e a CBS são por fora, por isso seus valores devem ser adicionados ao valor total da NF
            vTotNF = vLiq (em 2026)
            vTotNF = vLiq + vCBS + vIBSTot (a partir de 2027)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gIBS" type="tcTotalIBS">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores referentes ao IBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gCBS" type="tcTotalCBS">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores referentes à CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gTribRegular" type="tcTotalTribRegular" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações de tributação regular
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gTribCompraGov" type="tcTotalTribCompraGov" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações da composição do valor do IBS e da CBS em compras governamentais
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO IBSCBS-->
  <xsd:complexType name="tcResumoIBSCBS">
    <xsd:sequence>
      <xsd:element name="cLocalidadeIncid" type="tsCodigoMunicipioIbge">
        <xsd:annotation>
          <xsd:documentation>
            Código IBGE da localidade de incidência do IBS/CBS (local da operação)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="xLocalidadeIncid" type="tsDesc150">
        <xsd:annotation>
          <xsd:documentation>
            Nome da localidade de incidência do IBS/CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="pRedutor" type="tsDec2V2">
        <xsd:annotation>
          <xsd:documentation>
            Percentual de redução de aliquota em compra governamental
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="valores" type="tcValoresIBSCBS">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de valores brutos referentes ao IBS/CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="totCIBS" type="tcTotalCIBS">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de Totalizadores
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!--TIPO COMPLEXO PARA INFORMAÇÕES DECLARADAS REFERENTES A IBS/CBS-->
  <xsd:complexType name="tcIBSCBS">
    <xsd:sequence>
      <xsd:element name="finNFSe" type="tsFinNFSe">
        <xsd:annotation>
          <xsd:documentation>
            Indicador da finalidade da emissão de NFS-e
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="indFinal" type="tsIndFinal">
        <xsd:annotation>
          <xsd:documentation>
            Indica operação de uso ou consumo pessoal (art. 57)
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="cIndOp" type="tsCodIndOp">
        <xsd:annotation>
          <xsd:documentation>
            Código indicador da operação de fornecimento, conforme tabela "código indicador de operação"
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="tpOper" type="tsTpOper" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Tipo de Operação com Entes Governamentais ou outros serviços sobre bens imóveis
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gRefNFSe" type="tcInfoRefNFSe" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de NFS-e referenciadas
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="tpEnteGov" type="tsTpEnteGov" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Tipo de ente governamental
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="indDest" type="tsIndDest">
        <xsd:annotation>
          <xsd:documentation>
            A respeito do Destinatário dos serviços
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="dest" type="tcInfoDest" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações relativas ao Destinatário
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="imovel" type="tcInfoImovel" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações de operações relacionadas a bens imóveis, exceto obras
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="valores" type="tcInfoValoresIBSCBS">
        <xsd:annotation>
          <xsd:documentation>
            Grupo de informações relativas aos valores do serviço prestado para IBS e CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="resumo" type="tcResumoIBSCBS">
        <xsd:annotation>
          <xsd:documentation>
            Mais dados do serviço para IBS e CBS
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcInfPedidoCancelamento">
    <xsd:sequence>
      <xsd:element name="IdentificacaoNfse" type="tcIdentificacaoNfse" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CodigoCancelamento" type="tsCodigoCancelamentoNfse" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    	<!-- ALTERADO POR NATAL
	linha original : <xsd:attribute name="id" type="tsIdTag" />
	motivo: Todos os campos iniciam com letra maiuscula, apenas o id estava com minuscula
	-->
	 <xsd:attribute name="Id" type="tsIdTag" />

  </xsd:complexType>
  <xsd:complexType name="tcPedidoCancelamento">
    <xsd:sequence>
      <xsd:element name="InfPedidoCancelamento" type="tcInfPedidoCancelamento" minOccurs="1" maxOccurs="1" />
      <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcConfirmacaoCancelamento">
    <xsd:sequence>
      <xsd:element name="Pedido" type="tcPedidoCancelamento" minOccurs="1" maxOccurs="1" />
      <xsd:element name="DataHoraCancelamento" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>

    	<!-- ALTERADO POR NATAL
	linha original : <xsd:attribute name="id" type="tsIdTag" />
	motivo: Todos os campos iniciam com letra maiuscula, apenas o id estava com minuscula
	-->
	 <xsd:attribute name="Id" type="tsIdTag" />

  </xsd:complexType>
  <xsd:complexType name="tcCancelamentoNfse">
    <xsd:sequence>
      <xsd:element name="Confirmacao" type="tcConfirmacaoCancelamento" minOccurs="1" maxOccurs="1" />
      <xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcInfSubstituicaoNfse">
    <xsd:sequence>
      <xsd:element name="NfseSubstituidora" type="tsNumeroNfse" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>

    	<!-- ALTERADO POR NATAL
	linha original : <xsd:attribute name="id" type="tsIdTag" />
	motivo: Todos os campos iniciam com letra maiuscula, apenas o id estava com minuscula
	-->
    <xsd:attribute name="Id" type="tsIdTag" />

  </xsd:complexType>
  <xsd:complexType name="tcSubstituicaoNfse">
    <xsd:sequence>
      <xsd:element name="SubstituicaoNfse" type="tcInfSubstituicaoNfse" minOccurs="1" maxOccurs="1" />
      <xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="2" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcCompNfse">
    <xsd:sequence>
      <xsd:element name="Nfse" type="tcNfse" minOccurs="1" maxOccurs="1" />
      <xsd:element name="NfseCancelamento" type="tcCancelamentoNfse" minOccurs="0" maxOccurs="1" />
      <xsd:element name="NfseSubstituicao" type="tcSubstituicaoNfse" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="CompNfse" type="tcCompNfse" />
  <xsd:element name="ListaMensagemRetorno">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="MensagemRetorno" type="tcMensagemRetorno" minOccurs="1" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:complexType name="tcMensagemRetorno">
    <xsd:sequence>
      <xsd:element name="Codigo" type="tsCodigoMensagemAlerta" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Correcao" type="tsDescricaoMensagemAlerta" minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcMensagemRetornoLote">
    <xsd:sequence>
      <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Codigo" type="tsCodigoMensagemAlerta" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="tcLoteRps">
    <xsd:sequence>
      <xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1" />
      <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="1" maxOccurs="1" />
      <xsd:element name="QuantidadeRps" type="tsQuantidadeRps" minOccurs="1" maxOccurs="1" />
      <xsd:element name="ListaRps" minOccurs="1" maxOccurs="1">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="Rps" maxOccurs="unbounded" type="tcRps" minOccurs="1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- ALTERADO POR NATAL
	linha original : <xsd:attribute name="id" type="tsIdTag" />
	motivo: Todos os campos iniciam com letra maiuscula, apenas o id estava com minuscula
	-->
    <xsd:attribute name="Id" type="tsIdTag" />

  </xsd:complexType>
  <xsd:element name="EnviarLoteRpsResposta">
    <xsd:complexType>
      <xsd:choice>
        <xsd:sequence>
          <xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="1" maxOccurs="1" />
          <xsd:element name="DataRecebimento" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
          <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1" />
        </xsd:sequence>
        <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="EnviarLoteRpsEnvio">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="LoteRps" type="tcLoteRps" />
        <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarSituacaoLoteRpsResposta">
    <xsd:complexType>
      <xsd:choice>
        <xsd:sequence>
          <xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="1" maxOccurs="1" />
          <xsd:element name="Situacao" type="tsSituacaoLoteRps" minOccurs="1" maxOccurs="1" />
        </xsd:sequence>
        <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarSituacaoLoteRpsEnvio">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
        <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarNfseRpsResposta">
    <xsd:complexType>
      <xsd:choice>
        <xsd:element name="CompNfse" type="tcCompNfse" minOccurs="1" maxOccurs="1" />
        <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarNfseRpsEnvio">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1" />
        <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarNfseResposta">
    <xsd:complexType>
      <xsd:choice>
        <xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="CompNfse" maxOccurs="unbounded" type="tcCompNfse" minOccurs="0" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarNfseEnvio">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
        <xsd:element name="NumeroNfse" type="tsNumeroNfse" minOccurs="0" maxOccurs="1" />
        <xsd:element name="PeriodoEmissao" minOccurs="0" maxOccurs="1">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="DataInicial" type="tsData" minOccurs="1" maxOccurs="1" />
              <xsd:element name="DataFinal" type="tsData" minOccurs="1" maxOccurs="1" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="Tomador" type="tcIdentificacaoTomador" minOccurs="0" maxOccurs="1" />
        <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarLoteRpsResposta">
    <xsd:complexType>
      <xsd:choice>
        <xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="CompNfse" maxOccurs="unbounded" type="tcCompNfse" minOccurs="1" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ConsultarLoteRpsEnvio">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
        <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="CancelarNfseResposta">
    <xsd:complexType>
      <xsd:choice>
        <xsd:element name="Cancelamento" type="tcCancelamentoNfse" />
        <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="CancelarNfseEnvio">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Pedido" type="tcPedidoCancelamento" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>