<?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/evtTotal/v1_02_00" targetNamespace="http://www.reinf.esocial.gov.br/schemas/evtTotal/v1_02_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="evtTotal" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation>Evento Totalização</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 ou ano/mês/dia no formato AAAA-MM-DD de referência das informações.
                            O formato diário refere-se a consolidação de bases e tributos informados apenas através do evento R-3010.
                          </xs:documentation>
                        </xs:annotation>
                        <xs:union>
                          <xs:simpleType>
                            <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:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="10"/>
                              <xs:pattern value="20([0-9][0-9])-(0[1-9]|1[0-2])-([0-3][0-9])"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:union>
                      </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:element name="infoRecEv" type="TDadosRecepcaoEvento" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Informações de processamento da consulta</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="infoRecEv" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    nformações de processamento dos eventos
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="dhProcess" minOccurs="1" maxOccurs="1">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Data e hora do início do processamento da consulta</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:date"/>
                      </xs:simpleType>
                    </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="20" />
                        </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:element>
              <xs:element name="infoTotal" 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 e de contribuições sociais:
                            1 - Há informações de contribuições sociais e/ou de suas bases de cálculo.
                            2 - Há movimento, porém não há informações de contribuições sociais nem de suas bases de cálculo.
                            3 - Não há movimento de 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="infoContrib" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>
                          nformações gerais do contribuinte
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="indEscrituracao" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>
                                Indicativo da obrigatoriedade do contribuinte em fazer a sua escrituração contábil na ECD. Escrituração Contábil Digital:
                                0 - Não é obrigada
                                1 - Empresa obrigada a entregar a ECD.
                                Origem R-1000
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:unsignedInt">
                                <xs:pattern value="(0|1)"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="indDesoneracao" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>
                                Indicativo de desoneração da folha pela CPRB (conforme R-1000)
                                0 - Não Aplicável;
                                1 - Empresa enquadrada nos art. 7º a 9º da Lei 12.546/2011.
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:unsignedInt">
                                <xs:pattern value="(0|1)"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="indAcordoIsenMulta" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>
                                Indicativo da existência de acordo internacional para isenção de multa:
                                0 - Sem acordo;
                                1 - Com acordo.
                                Origem R-1000
                                Valores Válidos: 0, 1.
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:unsignedInt">
                                <xs:pattern value="(0|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 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: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 suspensaOrigem: 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: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="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:complexType name="TDadosRecepcaoEvento">
    <xs:annotation>
      <xs:documentation>Define os dados de processamento dos eventos</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <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="3"/>
          </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="20"/>
          </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:schema>
