<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.reinf.esocial.gov.br/schemas/evtTotalContrib/v1_03_00" targetNamespace="http://www.reinf.esocial.gov.br/schemas/evtTotalContrib/v1_03_00" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="./xmldsig-core-schema.xsd"/>
  <xs:element name="Reinf">
    <xs:annotation>
      <xs:documentation>EFD-Reinf</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="evtTotalContrib" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation>Evento totalizador por contribuinte</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ideEvento" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>Informações de identificação do evento</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="perApur" minOccurs="1" maxOccurs="1">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>
                            Informar o ano/mês no formato AAAA-MM de referência das informações
                          </xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:string">
                          <xs:length value="7"/>
                          <xs:pattern value="20([0-9][0-9])-(0[1-9]|1[0-2])"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="ideContri" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    Informações de identificação do contribuinte
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="tpInsc" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Preencher com o código correspondente ao tipo de inscrição.  Deve ser igual a [1] (CNPJ) ou [2] (CPF)</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:unsignedByte">
                          <xs:pattern value="1|2"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="nrInsc" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Informar o número de inscrição do contribuinte de acordo com o tipo de inscrição indicado no campo {tpInsc}. Se for um CNPJ deve ser informada apenas a Raiz/Base de oito posições, exceto se natureza jurídica de administração pública direta federal ([101-5], [104-0], [107-4], [116-3], situação em que o campo deve ser preenchido com o CNPJ completo (14 posições).</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="8"/>
                          <xs:maxLength value="14"/>
                          <xs:pattern value="[0-9]{11}|[0-9]{8}|[0-9]{14}"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="ideRecRetorno" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    Informações do Recibo de Retorno
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ideStatus" type="TStatus" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Situação atual do evento</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="infoRecEv" type="TDadosProcessamentoEvento" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    Informações de processamento dos eventos
                  </xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="infoTotalContrib" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    Informações relativas às Totalizações
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="nrRecArqBase" minOccurs="0" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Deve ser um recibo de entrega válido, correspondente ao arquivo que deu origem à presente solicitação (R-2099).</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="52" />
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="indExistInfo" minOccurs="1" maxOccurs="1">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>
                            Indicativo de existência de valores de bases:
                            1 - Há informações de bases e/ou de tributos;
                            2 - Há movimento, porém não há informações de bases ou de tributos;
                            3 - Não há movimento na competência.
                          </xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:unsignedInt">
                          <xs:pattern value="[1-3]{1}"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="RTom" minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>
                          Totalizadores do evento R-2010
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="cnpjPrestador" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>
                                CNPJ do Prestador de Serviços.
                                Origem: R-2010.
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:pattern value="[0-9]{14}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalBaseRet" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Base de cálculo da retenção da contribuição previdenciária. Origem: R-2010.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalRetPrinc" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Soma do valor da retenção principal das notas fiscais de serviço. Origem: R-2010 - Código de Receita - CR 1162-01</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalRetAdic" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Soma do valor do adicional de retenção das notas fiscais.Origem: R-2010 - CR 1141-06</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalNRetPrinc" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da retenção principal / Origem: R-2010 - CR 1162-01 - Suspenso</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalNRetAdic" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da retenção adicional / Origem: R-2010 - CR 1141-06 - Suspenso</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="RPrest" minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>
                          Totalizadores do evento R-2020
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="tpInscTomador" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>
                                  Preencher com o código correspondente ao tipo de inscrição.
                                  Origem: R-2020.
                                  Valores Válidos: 1,4
                                </xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:unsignedByte">
                                <xs:minInclusive value="1"/>
                                <xs:maxInclusive value="4"/>
                                <xs:pattern value="[1|4]"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="nrInscTomador" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Número de inscrição do Tomador de Serviços</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="8"/>
                                <xs:maxLength value="14"/>
                                <xs:pattern value="[0-9]{8}|[0-9]{14}|[a-zA-Z0-9./-]"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalBaseRet" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>
                                  Preencher com a soma da base de cálculo da retenção da contribuição previdenciária
                                  das notas fiscais emitidas para o contratante
                                </xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalRetPrinc" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Soma do valor da retenção das notas fiscais de serviço emitidas para o contratante</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalRetAdic" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Soma do valor do adicional de retenção das notas fiscais</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalNRetPrinc" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da retenção principal em decorrência da decisão judicial.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalNRetAdic" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da retenção principal em decorrência da decisão judicial.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="RRecRepAD" minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>
                          Totalizadores do evento R-2040
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="cnpjAssocDesp" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>
                                  CNPJ da associação desportiva - origem R-2040
                                </xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="8"/>
                                <xs:maxLength value="14"/>
                                <xs:pattern value="[0-9]{8}|[0-9]{14}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalRep" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor bruto dos recursos repassados. Origem: R- 2040.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalRet" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Soma do valor da retenção dos recursos repassados.Origem: R- 2040 - CR 1151-02</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrTotalNRet" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da retenção que deixou de ser feita pela entidade - Origem: R- 2040 - CR 1151-02 - Suspenso</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="RComl" minOccurs="0" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>
                          Totalizadores do evento R-2050
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="vlrCPApur" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da Contribuição Previdenciária.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrRatApur" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da Contribuição Previdenciária GILRAT</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrSenarApur" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da Contribuição para o SENAR</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrCPSusp" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da Contribuição Previdenciária com exigibilidade suspensa</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrRatSusp" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da contribuição para Gilrat com exigibilidade suspensa</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrSenarSusp" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da contribuição para o Senar com exigibilidade suspensa</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="RCPRB" minOccurs="0" maxOccurs="4">
                      <xs:annotation>
                        <xs:documentation>
                          Totalizadores do evento R-2060
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="codRec" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>
                                  Código de Receita - CR
                                  Valores Válidos: 2991-01, 2985-01, 2985-04, 2985-06 (sem os hífens).
                                </xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="1"/>
                                <xs:maxLength value="6"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrCPApurTotal" minOccurs="1" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor do total da Contribuição Previdenciária sobre Receita Bruta</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="vlrCPRBSusp" minOccurs="0" maxOccurs="1">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Valor da Contribuição Previdenciária com exigibilidade suspensa Origem: R-2060.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="4"/>
                                <xs:maxLength value="17" />
                                <xs:pattern value="[0-9]{1,14}[,][0-9]{2}"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" use="required">
              <xs:annotation>
                <xs:documentation>Identificação única do evento.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:ID">
                  <xs:length value="36" />
                  <xs:pattern value="I{1}D{1}[0-9]{34}" />
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element ref="ds:Signature"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>


  <xs:complexType name="TStatus">
    <xs:sequence>
      <xs:element name="cdRetorno" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Código do Retorno</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="6"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="descRetorno" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Descrição do retorno</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="255"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="regOcorrs" type="TRegistroOcorrencias"  minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Informaçoes de ocorrências registradas.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TDadosProcessamentoEvento">
    <xs:annotation>
      <xs:documentation>Informações de processamento dos eventos</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="nrProtEntr"  minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Número do protocolo de entrega do evento</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="49"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="dhProcess" type="xs:dateTime" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Data e hora do início do processamento da consulta</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="tpEv" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Tipo do Evento</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="6" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="idEv" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>ID do Evento</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="36"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="hash" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Hash do arquivo processado.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="60"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TRegistroOcorrencias">
    <xs:annotation>
      <xs:documentation>Define uma ocorrencia encontrada no processamento de um arquivo.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="tpOcorr" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Contém o tipo da ocorrencia: 1 - Aviso, 2 - Erro</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:totalDigits value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="localErroAviso" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Campo que originou o erro ou aviso</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="100"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="codResp" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Código do status da resposta do processamento da consulta</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="6"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="dscResp" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Descrição literal da resposta do processamento da consulta</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="255"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>


</xs:schema>
