<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.sped.fazenda.gov.br/nfse" xmlns="http://www.sped.fazenda.gov.br/nfse" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="TVerNFSe">
    <xs:annotation>
      <xs:documentation>Tipo Versão da NF-e - 1.00|1.01</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="4"/>
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="1\.00|1\.01"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSString">
    <xs:annotation>
      <xs:documentation>Tipo string genérico</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[!-ÿ]{1}[ -ÿ]*[!-ÿ]{1}|[!-ÿ]{1}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSStringComQuebraDeLinha">
    <xs:annotation>
      <xs:documentation>Tipo string genérico</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[\s\S!-ÿ]{1}[\s\S -ÿ]{0,}[\s\S!-ÿ]{1}|[\s\S!-ÿ]{1}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdNFSe">
    <xs:annotation>
      <xs:documentation>
        Informar o identificador precedido do literal ‘NFS’. A regra de formação do identificador de 53 posições da NFS-e é:
        "NFS" + Cód.Mun.(7) + Amb.Ger.(1) + Tipo de Inscrição Federal(1) + Inscrição Federal(14) + No.NFS-e(13) + AnoMes Emis.(4) + Cód.Num.(9) + DV(1)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="53"/>
      <xs:pattern value="NFS[0-9]{50}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdDPS">
    <xs:annotation>
      <xs:documentation>
        Informar o identificador precedido do literal ‘DPS’. A regra de formação do identificador de 45 posições da DPS é:
        "DPS" + Cód.Mun (7) + Tipo de Inscrição Federal (1) + Inscrição Federal (14 - CPF completar com 000 à esquerda) + Série DPS (5)+ Núm. DPS (15)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="45"/>
      <xs:pattern value="DPS[0-9]{42}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoAmbiente">
    <xs:annotation>
      <xs:documentation>
        Tipos de ambiente do Sistema Nacional NFS-e: 
        1 - Produção; 
        2 - Homologação;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSAmbGeradorNFSe">
    <xs:annotation>
      <xs:documentation>
        Tipo Ambiente Gerador de NFS-e:
        1 - Prefeitura;
        2 - Sistema Nacional da NFS-e;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSAmbGeradorEvt">
    <xs:annotation>
      <xs:documentation>
        Tipo Ambiente gerador do evento:
        1- Prefeitura;
        2- Sefin Nacional;
        3- Ambiente Nacional.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoEmissao">
    <xs:annotation>
      <xs:documentation>
        Tipo de emissão da NFS-e:
        1 - Emissão normal no modelo da NFS-e Nacional;
        2 - Emissão original em leiaute próprio do município com transcrição para o modelo da NFS-e Nacional.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSProcEmissao">
    <xs:annotation>
      <xs:documentation>
        Processo de Emissão da DPS:
        1 - Emissão com aplicativo do contribuinte (via Web Service);
        2 - Emissão com aplicativo disponibilizado pelo fisco (Web);
        3 - Emissão com aplicativo disponibilizado pelo fisco (App);
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSData">
    <xs:annotation>
      <xs:documentation>Tipo data no formato AAAA-MM-DD</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs: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)))))"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDateTimeUTC">
    <xs:annotation>
      <xs:documentation>Data e Hora, formato UTC (AAAA-MM-DDThh:mm:ssTZD, onde TZD = +hh:mm ou -hh:mm)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs: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)))))T(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d([\-,\+](0[0-9]|10|11):00|([\+](12):00))"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSVerAplic">
    <xs:annotation>
      <xs:documentation>Tipo Versão do Aplicativo que gerou o documento fiscal</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSSerieDPS">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="5"/>
      <xs:pattern value="[0-9]{1,5}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSEmitenteDPS">
    <xs:annotation>
      <xs:documentation>
        Emitente da DPS:
        1 - Prestador
        2 - Tomador
        3 - Intermediário
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSMotivoEmisTI">
    <xs:annotation>
      <xs:documentation>
        Motivo da Emissão da DPS pelo Tomador/Intermediário:
        1 - Importação de Serviço;
        2 - Tomador/Intermediário obrigado a emitir NFS-e por legislação municipal;
        3 - Tomador/Intermediário emitindo NFS-e por recusa de emissão pelo prestador;
        4 - Tomador/Intermediário emitindo por rejeitar a NFS-e emitida pelo prestador;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSChaveNFSe">
    <xs:annotation>
      <xs:documentation>Tipo Chave da Nota Fiscal de Serviço Eletrônica</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="50"/>
      <xs:pattern value="[0-9]{50}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSChaveNFe">
    <xs:annotation>
      <xs:documentation>Tipo Chave da Nota Fiscal Eletrônica - NF-e</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="44"/>
      <xs:pattern value="[0-9]{44}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodJustCanc">
    <xs:annotation>
      <xs:documentation>
        Código de justificativa de cancelamento:
        1 - Erro na Emissão;
        2 - Serviço não Prestado;
        9 - Outros;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodJustSubst">
    <xs:annotation>
      <xs:documentation>
        Código de justificativa para substituição de NFS-e:
        01 - Desenquadramento de NFS-e do Simples Nacional;
        02 - Enquadramento de NFS-e no Simples Nacional;
        03 - Inclusão Retroativa de Imunidade/Isenção para NFS-e;
        04 - Exclusão Retroativa de Imunidade/Isenção para NFS-e;
        05 - Rejeição de NFS-e pelo tomador ou pelo intermediário se responsável pelo recolhimento do tributo;
        99 - Outros;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="01"/>
      <xs:enumeration value="02"/>
      <xs:enumeration value="03"/>
      <xs:enumeration value="04"/>
      <xs:enumeration value="05"/>
      <xs:enumeration value="99"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodJustAnaliseFiscalCanc">
    <xs:annotation>
      <xs:documentation>
        Código do motivo da solicitação de análise fiscal para cancelamento de NFS-e:
        1 - Erro na Emissão;
        2 - Serviço não Prestado;
        3 - Outros.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodMotivoRejeicao">
    <xs:annotation>
      <xs:documentation>
        Motivo da Rejeição da NFS-e:
        1 - NFS-e em duplicidade;
        2 - NFS-e já emitida pelo tomador;
        3 - Não ocorrência do fato gerador;
        4 - Erro quanto a responsabilidade tributária;
        5 - Erro quanto ao valor do serviço, valor das deduções ou serviço prestado ou data do fato gerador;
        9 - Outros;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodJustAnaliseFiscalCancDef">
    <xs:annotation>
      <xs:documentation>
        Resposta da análise da solicitação do cancelamento extemporâneo de NFS-e:
        1 - Cancelamento Extemporâneo Deferido.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodJustAnaliseFiscalCancIndef">
    <xs:annotation>
      <xs:documentation>
        Resposta da análise da solicitação do cancelamento extemporâneo de NFS-e:
        1 - Cancelamento Extemporâneo Indeferido;
        2 - Cancelamento Extemporâneo Indeferido Sem Análise de Mérito.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumProcAdmAnaliseFiscalCanc">
    <xs:annotation>
      <xs:documentation>Número do processo administrativo municipal vinculado à solicitação de cancelamento extemporâneo de NFS-e.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
      <xs:pattern value="[0-9]{1,30}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodAutorManifestacao">
    <xs:annotation>
      <xs:documentation>
        Tipo do autor da manifestação da NFS-e:
        1 - Prestador;
        2 - Tomador;
        3 - Intermediário.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSMotivo">
    <xs:annotation>
      <xs:documentation>Descrição do motivo da substituição da NFS-e</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="15"/>
      <xs:maxLength value="255"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCNPJ">
    <xs:annotation>
      <xs:documentation>Tipo Número do CNPJ</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="14"/>
      <xs:pattern value="[0-9]{14}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCPF">
    <xs:annotation>
      <xs:documentation>Tipo Número do CPF</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="11"/>
      <xs:pattern value="[0-9]{11}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCAEPF">
    <xs:annotation>
      <xs:documentation>Tipo Número do CAEPF</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="14"/>
      <xs:pattern value="[0-9]{14}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNIF">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodNaoNIF">
    <xs:annotation>
      <xs: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;
      </xs:documentation>
    </xs:annotation>
    <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:simpleType name="TSInscMun">
    <xs:restriction base="xs:string">
      <xs:maxLength value="15"/>
      <xs:minLength value="1"/>
      <xs:whiteSpace value="preserve"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNomeRazaoSocial">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="300"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNomeFantasia">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="150"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSLogradouro">
    <xs:annotation>
      <xs:documentation>Logradouro</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="255"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumeroEndereco">
    <xs:annotation>
      <xs:documentation>Número</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="60"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSComplementoEndereco">
    <xs:annotation>
      <xs:documentation>Complemento</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="156"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSBairro">
    <xs:annotation>
      <xs:documentation>Bairro</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="60"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSUF">
    <xs:annotation>
      <xs:documentation>Tipo Sigla da UF</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="AC"/>
      <xs:enumeration value="AL"/>
      <xs:enumeration value="AM"/>
      <xs:enumeration value="AP"/>
      <xs:enumeration value="BA"/>
      <xs:enumeration value="CE"/>
      <xs:enumeration value="DF"/>
      <xs:enumeration value="ES"/>
      <xs:enumeration value="GO"/>
      <xs:enumeration value="MA"/>
      <xs:enumeration value="MG"/>
      <xs:enumeration value="MS"/>
      <xs:enumeration value="MT"/>
      <xs:enumeration value="PA"/>
      <xs:enumeration value="PB"/>
      <xs:enumeration value="PE"/>
      <xs:enumeration value="PI"/>
      <xs:enumeration value="PR"/>
      <xs:enumeration value="RJ"/>
      <xs:enumeration value="RN"/>
      <xs:enumeration value="RO"/>
      <xs:enumeration value="RR"/>
      <xs:enumeration value="RS"/>
      <xs:enumeration value="SC"/>
      <xs:enumeration value="SE"/>
      <xs:enumeration value="SP"/>
      <xs:enumeration value="TO"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCEP">
    <xs:annotation>
      <xs:documentation>CEP</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{8}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodigoEndPostal">
    <xs:annotation>
      <xs:documentation>Código de enderaçamento postal</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="11"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCidade">
    <xs:annotation>
      <xs:documentation>Cidade</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="60"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSEstadoProvRegiao">
    <xs:annotation>
      <xs:documentation>Estado, província ou região</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="60"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSEnderCompletoExt">
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="255"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTelefone">
    <xs:annotation>
      <xs:documentation>
        Número do telefone do prestador:
        Preencher com o Código DDD + número do telefone.
        Nas operações com exterior é permitido informar o código do país + código da localidade + número do telefone
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{6,20}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSEmail">
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TCCodTribMun">
    <xs:annotation>
      <xs:documentation>Código de tributação municipal do ISSQN</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{3}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodMoeda">
    <xs:annotation>
      <xs:documentation>Tipo com código que identifica a moeda conforme tabela do BACEN</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="3"/>
      <xs:pattern value="[0-9]{3}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSModoPrestacao">
    <xs:annotation>
      <xs:documentation>
        Modo de Prestação:
        0 - Desconhecido (tipo não informado na nota de origem);
        1 - Transfronteiriço;
        2 - Consumo no Brasil;
        3 - Presença Comercial no Exterior;
        4 - Movimento Temporário de Pessoas Físicas;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSVincPrest">
    <xs:annotation>
      <xs:documentation>
        Vínculo entre as partes no negócio:
        0 - Sem vínculo com o Tomador/Prestador
        1 - Controlada;
        2 - Controladora;
        3 - Coligada;
        4 - Matriz;
        5 - Filial ou sucursal;
        6 - Outro vínculo;
        9 - Desconhecido (tipo não informado na nota de origem);
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
      <xs:enumeration value="6"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSMecAFComExPrest">
    <xs:annotation>
      <xs:documentation>
        Mecanismo de apoio/fomento ao Comércio Exterior utilizado pelo prestador do serviço:
        00 - Desconhecido (tipo não informado na nota de origem);
        01 - Nenhum;
        02 - ACC - Adiantamento sobre Contrato de Câmbio – Redução a Zero do IR e do IOF;
        03 - ACE – Adiantamento sobre Cambiais Entregues - Redução a Zero do IR e do IOF;
        04 - BNDES-Exim Pós-Embarque – Serviços;
        05 - BNDES-Exim Pré-Embarque - Serviços;
        06 - FGE - Fundo de Garantia à Exportação;
        07 - PROEX - EQUALIZAÇÃO
        08 - PROEX - Financiamento;
      </xs:documentation>
    </xs:annotation>
    <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:enumeration value="07"/>
      <xs:enumeration value="08"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSMecAFComExToma">
    <xs:annotation>
      <xs:documentation>
        Mecanismo de apoio/fomento ao Comércio Exterior utilizado pelo tomador do serviço:
        00 - Desconhecido (tipo não informado na nota de origem);
        01 - Nenhum;
        02 - Adm. Pública e Repr. Internacional;
        03 - Alugueis e Arrend. Mercantil de maquinas, equip., embarc. e aeronaves;
        04 - Arrendamento Mercantil de aeronave para empresa de transporte aéreo público;
        05 - Comissão a agentes externos na exportação;
        06 - Despesas de armazenagem, mov. e transporte de carga no exterior;
        07 - Eventos FIFA (subsidiária);
        08 - Eventos FIFA;
        09 - Fretes, arrendamentos de embarcações ou aeronaves e outros;
        10 - Material Aeronáutico;
        11 - Promoção de Bens no Exterior;
        12 - Promoção de Dest. Turísticos Brasileiros;
        13 - Promoção do Brasil no Exterior;
        14 - Promoção Serviços no Exterior;
        15 - RECINE;
        16 - RECOPA;
        17 - Registro e Manutenção de marcas, patentes e cultivares;
        18 - REICOMP;
        19 - REIDI;
        20 - REPENEC;
        21 - REPES;
        22 - RETAERO; 
        23 - RETID;
        24 - Royalties, Assistência Técnica, Científica e Assemelhados;
        25 - Serviços de avaliação da conformidade vinculados aos Acordos da OMC;
        26 - ZPE;
      </xs:documentation>
    </xs:annotation>
    <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:enumeration value="07"/>
      <xs:enumeration value="08"/>
      <xs:enumeration value="09"/>
      <xs:enumeration value="10"/>
      <xs:enumeration value="11"/>
      <xs:enumeration value="12"/>
      <xs:enumeration value="13"/>
      <xs:enumeration value="14"/>
      <xs:enumeration value="15"/>
      <xs:enumeration value="16"/>
      <xs:enumeration value="17"/>
      <xs:enumeration value="18"/>
      <xs:enumeration value="19"/>
      <xs:enumeration value="20"/>
      <xs:enumeration value="21"/>
      <xs:enumeration value="22"/>
      <xs:enumeration value="23"/>
      <xs:enumeration value="24"/>
      <xs:enumeration value="25"/>
      <xs:enumeration value="26"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSMovTempBens">
    <xs:annotation>
      <xs:documentation>
        Vínculo da Operação à Movimentação Temporária de Bens:
        0 - Desconhecido (tipo não informado na nota de origem);
        1 - Não;
        2 - Vinculada - Declaração de Importação;
        3 - Vinculada - Declaração de Exportação;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCategVeic">
    <xs:annotation>
      <xs:documentation>
        Categorias de veículos para cobrança:
        00 - Categoria de veículos (tipo não informado na nota de origem)
        01 - Automóvel, caminhonete e furgão;
        02 - Caminhão leve, ônibus, caminhão trator e furgão;
        03 - Automóvel e caminhonete com semireboque;
        04 - Caminhão, caminhão-trator, caminhão-trator com semi-reboque e ônibus;
        05 - Automóvel e caminhonete com reboque;
        06 - Caminhão com reboque;
        07 - Caminhão trator com semi-reboque;
        08 - Motocicletas, motonetas e bicicletas motorizadas;
        09 - Veículo especial;
        10 - Veículo Isento;
      </xs:documentation>
    </xs:annotation>
    <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:enumeration value="07"/>
      <xs:enumeration value="08"/>
      <xs:enumeration value="09"/>
      <xs:enumeration value="10"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumDocImport">
    <xs:annotation>
      <xs:documentation>Número da Declaração de Importação (DI/DSI/DA/DRI-E) averbado</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="12"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumRegExport">
    <xs:annotation>
      <xs:documentation>Número do Registro de Exportação (RE) averbado</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="12"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSEnvMDIC">
    <xs:annotation>
      <xs:documentation>
        Compartilhar as informações da NFS-e gerada a partir desta DPS com a Secretaria de Comércio Exterior:
        0 - Não enviar para o MDIC;
        1 - Enviar para o MDIC;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSPlaca">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[A-Z]{2,3}[0-9]{4}|[A-Z]{3,4}[0-9]{3}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodAcessoPed">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[a-zA-Z0-9]{10}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodContrato">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[a-zA-Z0-9]{4}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumEixos">
    <xs:annotation>
      <xs:documentation>Número de eixos para fins de cobrança</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{1,2}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRodagem">
    <xs:annotation>
      <xs:documentation>
        Tipo de rodagem:
        1 - Simples;
        2 - Dupla;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSSentido">
    <xs:annotation>
      <xs:documentation>Orientação de passagem do veículo: ângulo em graus a partir do norte geográfico em sentido horário, número inteiro de 0 a 359, onde 0º seria o norte, 90º o leste, 180º o sul, 270º o oeste. Precisão mínima de 10</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{1,3}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdeEvento">
    <xs:annotation>
      <xs:documentation>Identificação da Atividade de Evento (código identificador de evento determinado pela Administração Tributária Municipal)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodObra">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodCIB">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:length value="8"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSInscImobFisc">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDRT">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDescInfCompl">
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="2000"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodVerificacao">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="9"/>
      <xs:pattern value="[a-zA-Z0-9]{1,9}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSSerieNFNFS">
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
      <xs:pattern value="[a-zA-Z0-9]{1,15}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdeDedRed">
    <xs:annotation>
      <xs:documentation>
	Identificação da Dedução/Redução:
        1 – Alimentação e bebidas/frigobar;
        2 – Materiais;
        3 - Produção Externa;
        4 - Reembolso de despesas;
        5 – Repasse consorciado;
        6 – Repasse plano de saúde;
        7 – Serviços;
        8 – Subempreitada de mão de obra;
        9 - Profissional parceiro;
        99 – Outras deduções;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
      <xs:enumeration value="6"/>
      <xs:enumeration value="7"/>
      <xs:enumeration value="8"/>
      <xs:enumeration value="9"/>
      <xs:enumeration value="99"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDescOutDedRed">
    <xs:annotation>
      <xs:documentation>Descrição da Dedução/Redução quando a opção é "99 – Outras Deduções"</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="150"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumBeneficioMunicipal">
    <xs:annotation>
      <xs:documentation>
        Identificador do benefício parametrizado pelo município.

        Trata-se de um identificador único que foi gerado pelo Sistema Nacional no momento em que o município de incidência do ISSQN incluiu o benefício no sistema.
        
        Critério de formação do número de identificação de parâmetros municipais:   
        7 dígitos - posição 1 a 7: número identificador do Município, conforme código IBGE;
        2 dígitos - posições 8 e 9 : número identificador do tipo de parametrização (01-legislação, 02-regimes especiais, 03-retenções, 04-outros benefícios);
        5 dígitos - posição 10 a 14 : número sequencial definido pelo sistema quando do registro específico do parâmetro dentro do tipo de parametrização no sistema;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{14}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSOpExigSuspensa">
    <xs:annotation>
      <xs:documentation>
        Opção para Exigibilidade Suspensa:
        1 - Exigibilidade Suspensa por Decisão Judicial;
        2 - Exigibilidade Suspensa por Processo Administrativo;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumProcExigSuspensa">
    <xs:annotation>
      <xs:documentation>Número do processo judicial ou administrativo de suspensão da exigibilidade</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{30}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSOpSimpNac">
    <xs:annotation>
      <xs:documentation>
        Situação perante o Simples Nacional:
        1 - Não Optante;
        2 - Optante - Microempreendedor Individual (MEI);
        3 - Optante - Microempresa ou Empresa de Pequeno Porte (ME/EPP);
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRegimeApuracaoSimpNac">
    <xs:annotation>
      <xs:documentation>
        Opção para que o contribuinte optante pelo Simples Nacional ME/EPP (opSimpNac = 3) possa indicar, ao emitir o documento fiscal, em qual regime de apuração os tributos federais e municipal estão inseridos, caso tenha ultrapassado algum sublimite ou limite definido para o Simples Nacional.
        1 – Regime de apuração dos tributos federais e municipal pelo SN;
        2 – Regime de apuração dos tributos federais pelo SN e ISSQN  por fora do SN conforme respectiva legislação municipal do tributo;
        3 – Regime de apuração dos tributos federais e municipal por fora do SN conforme respectivas legislações federal e municipal de cada tributo;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSOpSNLimUltrap">
    <xs:annotation>
      <xs:documentation>
        Opção que indica se o limite do Simples Nacional foi ultrapassado:
        0 - Não ultrapassado;
        1 - Ultrapassado;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRegEspTrib">
    <xs:annotation>
      <xs:documentation>
        Tipos de Regimes Especiais de Tributação:
        0 - Nenhum;
        1 - Ato Cooperado (Cooperativa);
        2 - Estimativa;
        3 - Microempresa Municipal;
        4 - Notário ou Registrador;
        5 - Profissional Autônomo;
        6 - Sociedade de Profissionais;
        9 - Outros;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
      <xs:enumeration value="6"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTribISSQN">
    <xs:annotation>
      <xs:documentation>
        Tributação do ISSQN sobre o serviço prestado:
        1 - Operação tributável;
        2 - Imunidade;
        3 - Exportação de serviço;
        4 - Não Incidência;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumProcesso">
    <xs:annotation>
      <xs:documentation>
        Número do processo judicial ou administrativo de suspensão da exigibilidade.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoImunidadeISSQN">
    <xs:annotation>
      <xs:documentation>
            Identificação da Imunidade do ISSQN – somente para o caso de Imunidade.

            Tipos de Imunidades:
            
            0 - Imunidade (tipo não informado na nota de origem);
            1 - Patrimônio, renda ou serviços, uns dos outros (CF88, Art 150, VI, a);
            2 - Templos de qualquer culto (CF88, Art 150, VI, b);
            3 - Patrimônio, renda ou serviços dos partidos políticos, inclusive suas fundações, das entidades sindicais dos trabalhadores, das instituições de educação e de assistência social, sem fins lucrativos, atendidos os requisitos da lei (CF88, Art 150, VI, c);
            4 - Livros, jornais, periódicos e o papel destinado a sua impressão (CF88, Art 150, VI, d);
            5 - Fonogramas e videofonogramas musicais produzidos no Brasil contendo obras musicais ou literomusicais de autores brasileiros e/ou obras em geral interpretadas por artistas brasileiros bem como os suportes materiais ou arquivos digitais que os contenham, salvo na etapa de replicação industrial de mídias ópticas de leitura a laser.   (CF88, Art 150, VI, e);
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoRetISSQN">
    <xs:annotation>
      <xs:documentation>
        Tipo de retencao do ISSQN:
        1 - Não Retido;
        2 - Retido pelo Tomador;
        3 - Retido pelo Intermediario;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoCST">
    <xs:annotation>
      <xs:documentation>
        Código de Situação Tributária do PIS/COFINS (CST):
        00 - Nenhum;      
        01 - Operação Tributável com Alíquota Básica;
        02 - Operação Tributável com Alíquota Diferenciada;
        03 - Operação Tributável com Alíquota por Unidade de Medida de Produto;
        04 - Operação Tributável monofásica - Revenda a Alíquota Zero;
        05 - Operação Tributável por Substituição Tributária;
        06 - Operação Tributável a Alíquota Zero;
        07 - Operação Isenta da Contribuição;
        08 - Operação sem Incidência da Contribuição;
        09 - Operação com Suspensão da Contribuição;
        49 - Outras Operações de Saída;
        50 - Operação com Direito a Crédito – Vinculada Exclusivamente a Receita Tributada no Mercado Interno;
        51 - Operação com Direito a Crédito – Vinculada Exclusivamente a Receita Não-Tributada no Mercado Interno;
        52 - Operação com Direito a Crédito – Vinculada Exclusivamente a Receita de Exportação;
        53 - Operação com Direito a Crédito – Vinculada a Receitas Tributadas e Não-Tributadas no Mercado Interno;
        54 - Operação com Direito a Crédito – Vinculada a Receitas Tributadas no Mercado Interno e de Exportação;
        55 - Operação com Direito a Crédito – Vinculada a Receitas Não Tributadas no Mercado Interno e de Exportação;
        56 - Operação com Direito a Crédito – Vinculada a Receitas Tributadas e Não-Tributadas no Mercado Interno e de Exportação;
        60 - Crédito Presumido – Operação de Aquisição Vinculada Exclusivamente a Receita Tributada no Mercado Interno;
        61 - Crédito Presumido – Operação de Aquisição Vinculada Exclusivamente a Receita Não-Tributada no Mercado Interno;
        62 - Crédito Presumido – Operação de Aquisição Vinculada Exclusivamente a Receita de Exportação;
        63 - Crédito Presumido – Operação de Aquisição Vinculada a Receitas Tributadas e Não-Tributadas no Mercado Interno;
        64 - Crédito Presumido – Operação de Aquisição Vinculada a Receitas Tributadas no Mercado Interno e de Exportação;
        65 - Crédito Presumido – Operação de Aquisição Vinculada a Receitas Não-Tributadas no Mercado Interno e de Exportação;
        66 - Crédito Presumido – Operação de Aquisição Vinculada a Receitas Tributadas e Não-Tributadas no Mercado Interno e de Exportação;
        67 - Crédito Presumido – Outras Operações;
        70 - Operação de Aquisição sem Direito a Crédito;
        71 - Operação de Aquisição com Isenção;
        72 - Operação de Aquisição com Suspensão;
        73 - Operação de Aquisição a Alíquota Zero;
        74 - Operação de Aquisição sem Incidência da Contribuição;
        75 - Operação de Aquisição por Substituição Tributária;
        98 - Outras Operações de Entrada;
        99 - Outras Operações;
      </xs:documentation>
    </xs:annotation>
    <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:enumeration value="07"/>
      <xs:enumeration value="08"/>
      <xs:enumeration value="09"/>
      <xs:enumeration value="49"/>
      <xs:enumeration value="50"/>
      <xs:enumeration value="51"/>
      <xs:enumeration value="52"/>
      <xs:enumeration value="53"/>
      <xs:enumeration value="54"/>
      <xs:enumeration value="55"/>
      <xs:enumeration value="56"/>
      <xs:enumeration value="60"/>
      <xs:enumeration value="61"/>
      <xs:enumeration value="62"/>
      <xs:enumeration value="63"/>
      <xs:enumeration value="64"/>
      <xs:enumeration value="65"/>
      <xs:enumeration value="66"/>
      <xs:enumeration value="67"/>
      <xs:enumeration value="70"/>
      <xs:enumeration value="71"/>
      <xs:enumeration value="72"/>
      <xs:enumeration value="73"/>
      <xs:enumeration value="74"/>
      <xs:enumeration value="75"/>
      <xs:enumeration value="98"/>
      <xs:enumeration value="99"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSOpConsumServ">
    <xs:annotation>
      <xs:documentation>
        Opção para que o emitente informe onde ocorreu o consumo do serviço prestado.
        0 - Consumo do serviço prestado ocorrido no município do local da prestação;
        1 - Consumo do serviço prestado ocorrido ocorrido no exterior ;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoRetPISCofins">
    <xs:annotation>
      <xs:documentation>
        Tipo de retencao do Pis/Cofins:
        0 - PIS/COFINS/CSLL Não Retidos;
        1 - PIS/COFINS Retidos;
        2 - PIS/COFINS Não Retidos;
        3 - PIS/COFINS/CSLL Retidos;
        4 - PIS/COFINS Retidos, CSLL Não Retido;
        5 - PIS Retido, COFINS/CSLL Não Retido;
        6 - COFINS Retido, PIS/CSLL Não Retido;
        7 - PIS Não Retido, COFINS/CSLL Retidos;
        8 - PIS/COFINS Não Retidos, CSLL Retido;
        9 - COFINS Não Retido, PIS/CSLL Retidos;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
      <xs:enumeration value="6"/>
      <xs:enumeration value="7"/>
      <xs:enumeration value="8"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSTipoIndTotTrib">
    <xs:annotation>
      <xs:documentation>
        Indicador de informação de valor total de tributos. Possui valor fixo igual a zero (indTotTrib=0).
        Não informar nenhum valor estimado para os Tributos (Decreto 8.264/2014).
        0 - Não;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TBMISSQN">
    <xs:annotation>
      <xs:documentation>
        Tipo Benefício Municipal (BM):
        1) Isenção;
        2) Redução da BC em 'ppBM' %;
        3) Redução da BC em R$ 'vInfoBM';
        4) Alíquota Diferenciada de 'aliqDifBM' %;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
    <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
	</xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TStat">
    <xs:annotation>
      <xs:documentation>
        Situações possíveis:
        100 - NFS-e Gerada;
        102 - NFS-e de Decisão Judicial;
        103 - NFS-e Avulsa;
        107 - NFS-e MEI;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="100"/>
      <xs:enumeration value="102"/>
      <xs:enumeration value="103"/>
      <xs:enumeration value="107"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumDPS">
    <xs:annotation>
      <xs:documentation>Tipo Número do DPS</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="15"/>
      <xs:pattern value="[1-9]{1}[0-9]{0,14}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNNFSe">
    <xs:annotation>
      <xs:documentation>Tipo Número sequencial do documento</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="13"/>
      <xs:pattern value="[1-9]{1}[0-9]{0,12}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNDFSe">
    <xs:annotation>
      <xs:documentation>Tipo Número do DFS-e</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="13"/>
      <xs:pattern value="[1-9]{1}[0-9]{0,12}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodMunIBGE">
    <xs:annotation>
      <xs:documentation>Tipo Código do Município segundo tabela IBGE</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{7}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodPaisISO">
    <xs:annotation>
      <xs:documentation>Tipo Código do País segundo tabela ISO</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[A-Z]{2}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodTribNac">
    <xs:annotation>
      <xs:documentation>Código de tributação nacional do ISSQN:
        Regra de formação - 6 dígitos numéricos sendo: 2 para Item (LC 116/2003), 2 para Subitem (LC 116/2003) e 2 para Desdobro Nacional
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{6}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodNBS">
    <xs:annotation>
      <xs:documentation>
        Código da lista de Nomenclatura Brasileira de Serviços (NBS)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{9}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodigoInternoContribuinte">
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
      <xs:pattern value="[a-zA-Z0-9]{1,20}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc40">
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc150">
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="150"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc255">
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="255"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc600">
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="600"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc500">
    <xs:restriction base="TSString">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="500"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc1000">
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="1000"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDesc2000">
    <xs:restriction base="TSStringComQuebraDeLinha">
      <xs:minLength value="1"/>
      <xs:maxLength value="2000"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDec15V2">
    <xs:annotation>
      <xs:documentation>Valor decimal com 1 a 15 dígitos mais 2 casas decimais</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,14}(\.[0-9]{2})?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDec1V2">
    <xs:annotation>
      <xs:documentation>Valor decimal com 1 dígito mais 2 casas decimais</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="0|[0-9]{1}(\.[0-9]{2})?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDec2V2">
    <xs:annotation>
      <xs:documentation>Valor decimal com 1 ou 2 dígitos mais 2 casas decimais</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,1}(\.[0-9]{2})?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSDec3V2">
    <xs:annotation>
      <xs:documentation>Valor decimal com 1 a 3 dígitos mais 2 casas decimais</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,2}(\.[0-9]{2})?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNum3Dig">
    <xs:annotation>
      <xs:documentation>Número com 3 dígitos</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="3"/>
      <xs:pattern value="[0-9]{1}[0-9]{0,2}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNum7Dig">
    <xs:annotation>
      <xs:documentation>Número com 7 dígitos</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="7"/>
      <xs:pattern value="[0-9]{7}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNum14Dig">
    <xs:annotation>
      <xs:documentation>Número com 14 dígitos</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="14"/>
      <xs:pattern value="[0-9]{14}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNum15Dig">
    <xs:annotation>
      <xs:documentation>Número com 15 dígitos</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="15"/>
      <xs:pattern value="[0-9]{15}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdPedRegEvt">
    <xs:annotation>
      <xs:documentation>
        O identificador do pedido de registro do evento é formado conforme a concatenação dos seguintes campos:
        "PRE" + Chave de Acesso NFS-e + Tipo do evento + Número do Pedido de Registro do Evento (nPedRegEvento)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="59"/>
      <xs:pattern value="PRE[0-9]{56}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdEvento">
    <xs:annotation>
      <xs:documentation>
        Identificador do evento: "EVT" + Chave de acesso(50) Tipo do evento (6) + Pedido de Registro do Evento(3) (nPedRegEvento)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:maxLength value="62"/>
      <xs:pattern value="EVT[0-9]{59}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCodigoEventoNFSe">
    <xs:annotation>
      <xs:documentation>
        Código de evento da NFS-e
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="e101101"/>
      <xs:enumeration value="e105102"/>
      <xs:enumeration value="e105104"/>
      <xs:enumeration value="e105105"/>
      <xs:enumeration value="e305101"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSIdNumEvento">
    <xs:annotation>
      <xs:documentation>
        Referência ao Id "Manifestação de rejeição da NFS-e" que originou o presente evento de anulação.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{59}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumDFe">
    <xs:annotation>
      <xs:documentation>
        Número sequencial do documento gerado por ambiente gerador de DFe do município.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{1,13}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSSituacaoCadastroContribuinte">
    <xs:annotation>
      <xs:documentation>
        Identificação da situação do cadastro do contribuinte
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="150"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSMotivoSituacaoCadastroContribuinte">
    <xs:annotation>
      <xs:documentation>
        Motivo pelo qual o contribuinte se enquadra na situação informada
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSSituacaoEmissaoNFSE">
    <xs:annotation>
      <xs:documentation>
	Situação Emissão NFS-e:
        0 - Não Habilitado;
        1 - Habilitado;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSCategoriaServico">
    <xs:annotation>
      <xs:documentation>
	Categorias do serviço:
        1 - Locação;
        2 - Sublocação;
        3 - Arrendamento;
        4 - Direito de passagem;
        5 - Permissão de uso;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TCObjetoLocacao">
    <xs:annotation>
      <xs:documentation>
        Tipo de objetos da locação, sublocação, arrendamento, direito de passagem ou permissão de uso:
        1 - Ferrovia;
        2 - Rodovia;
        3 - Postes;
        4 - Cabos;
        5 - Dutos;
        6 - Condutos de qualquer natureza;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
      <xs:enumeration value="6"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSExtensaoTotal">
    <xs:annotation>
      <xs:documentation>
        Extensão total da ferrovia, rodovia, cabos, dutos ou condutos
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="5"/>
      <xs:pattern value="[0-9]{1,5}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSNumeroPostes">
    <xs:annotation>
      <xs:documentation>Número total de postes</xs:documentation>
    </xs:annotation>
    <xs:restriction base="TSString">
      <xs:minLength value="1"/>
      <xs:maxLength value="6"/>
      <xs:pattern value="[0-9]{1,6}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCFinNFSe">
    <xs:annotation>
      <xs:documentation>
        Indicador da finalidade da emissão de NFS-e:
        0 - NFS-e regular;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCIndFinal">
    <xs:annotation>
      <xs:documentation>
        Indica operação de uso ou consumo pessoal (art. 57):
        0 - Não;
        1 - Sim;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCCodIndOp">
    <xs:annotation>
      <xs:documentation>
        Código indicador da operação de fornecimento, conforme tabela "código indicador de operação"
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{6}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCTpOper">
    <xs:annotation>
      <xs: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;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5"/>
    </xs:restriction>
  </xs:simpleType>  
  <xs:simpleType name="TSRTCTpEnteGov">
    <xs:annotation>
      <xs: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;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCIndDest">
    <xs:annotation>
      <xs: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);
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="0"/>
      <xs:enumeration value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCTpReeRepRes">
    <xs:annotation>
      <xs: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;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="01"/>
      <xs:enumeration value="02"/>
      <xs:enumeration value="03"/>
      <xs:enumeration value="04"/>
      <xs:enumeration value="99"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCTipoChaveDFe">
    <xs:annotation>
      <xs: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;
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="9"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCChaveDFe">
    <xs:annotation>
      <xs:documentation>
        Chave do Documento Fiscal Eletrônico
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCCodSitTrib">
    <xs:annotation>
      <xs:documentation>
        Código de Situação Tributária
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{3}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCCodClassTrib">
    <xs:annotation>
      <xs:documentation>
        Código de Classificação Tributária
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{6}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TSRTCCodCredPres">
    <xs:annotation>
      <xs:documentation>
        Código e Classificação do Crédito Presumido
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{2}"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>