<?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/evtRecursoRepassadoAssociacao/v2_01_01" targetNamespace="http://www.reinf.esocial.gov.br/schemas/evtRecursoRepassadoAssociacao/v2_01_01" 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>Escrituracao Fiscal Digital de Retencoes e Outras Informacoes Fiscais (EFD-Reinf)</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="evtAssocDespRep" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation>Evento recursos repassados para associacoes desportivas</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ideEvento" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>Informacoes de identificacao do evento</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="indRetif" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Indicativo de Retificacao</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="nrRecibo" minOccurs="0" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Recibo arquivo a ser retificado</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="16"/>
                          <xs:maxLength value="52"/>
                          <xs:pattern value="[0-9]{1,18}[-][0-9]{2}[-][0-9]{4}[-][0-9]{4}[-][0-9]{1,18}"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="perApur" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Periodo de apuracao</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:gYearMonth">
                          <xs:pattern value="20([1-9][0-9])-(0[1-9]|1[0-2])"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="tpAmb" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Tipo de ambiente</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="procEmi" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Processo de emissao do evento</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="verProc" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Versao do processo de emissao 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:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="ideContri" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>Informacoes de identificacao do contribuinte</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="tpInsc" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Tipo de Inscricao</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:unsignedByte">
                          <xs:pattern value="[1]"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="nrInsc" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Numero de Inscricao</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:pattern value="[0-9]{8}|[0-9]{14}"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="ideEstab" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Identificacao do estabelecimento que repassou recursos</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="tpInscEstab" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>Tipo de inscricao do estabelecimento</xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:unsignedByte">
                                <xs:pattern value="[1]"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="nrInscEstab" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>Numero de inscricao do estabelecimento</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="recursosRep" minOccurs="1" maxOccurs="unbounded">
                            <xs:annotation>
                              <xs:documentation>Recursos repassados para associacoes desportivas</xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="cnpjAssocDesp" minOccurs="1" maxOccurs="1">
                                  <xs:annotation>
                                    <xs:documentation>CNPJ da Associacao Desportiva</xs:documentation>
                                  </xs:annotation>
                                  <xs:simpleType>
                                    <xs:restriction base="xs:string">
                                      <xs:pattern value="\d{14}"/>
                                    </xs:restriction>
                                  </xs:simpleType>
                                </xs:element>
                                <xs:element name="vlrTotalRep" minOccurs="1" maxOccurs="1">
                                  <xs:annotation>
                                    <xs:documentation>Valor Total Repassado</xs:documentation>
                                  </xs:annotation>
                                  <xs:simpleType>
                                    <xs:restriction base="xs:string">
                                      <xs:minLength value="4"/>
                                      <xs:maxLength value="15"/>
                                      <xs:pattern value="[0-9]{1,12}[,][0-9]{2}"/>
                                    </xs:restriction>
                                  </xs:simpleType>
                                </xs:element>
                                <xs:element name="vlrTotalRet" minOccurs="1" maxOccurs="1">
                                  <xs:annotation>
                                    <xs:documentation>Soma do valor da retencao dos recursos recebidos</xs:documentation>
                                  </xs:annotation>
                                  <xs:simpleType>
                                    <xs:restriction base="xs:string">
                                      <xs:minLength value="4"/>
                                      <xs:maxLength value="15"/>
                                      <xs:pattern value="[0-9]{1,12}[,][0-9]{2}"/>
                                    </xs:restriction>
                                  </xs:simpleType>
                                </xs:element>
                                <xs:element name="vlrTotalNRet" minOccurs="0" maxOccurs="1">
                                  <xs:annotation>
                                    <xs:documentation>Valor da retencao nao efetuada ou depositada em juizo em decorrencia da decisao judicial/administrativa</xs:documentation>
                                  </xs:annotation>
                                  <xs:simpleType>
                                    <xs:restriction base="xs:string">
                                      <xs:minLength value="4"/>
                                      <xs:maxLength value="15"/>
                                      <xs:pattern value="[0-9]{1,12}[,][0-9]{2}"/>
                                    </xs:restriction>
                                  </xs:simpleType>
                                </xs:element>
                                <xs:element name="infoRecurso" minOccurs="1" maxOccurs="unbounded">
                                  <xs:annotation>
                                    <xs:documentation>Detalhamento dos recursos repassados</xs:documentation>
                                  </xs:annotation>
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="tpRepasse" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Tipo de Repasse</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:unsignedByte">
                                            <xs:pattern value="[1|2|3|4|5]"/>
                                          </xs:restriction>
                                        </xs:simpleType>
                                      </xs:element>
                                      <xs:element name="descRecurso" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Descricao resumida do recurso repassado</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                            <xs:minLength value="2"/>
                                            <xs:maxLength value="20"/>
                                            <xs:whiteSpace value="preserve"/>
                                          </xs:restriction>
                                        </xs:simpleType>
                                      </xs:element>
                                      <xs:element name="vlrBruto" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Valor bruto</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                            <xs:minLength value="4"/>
                                            <xs:maxLength value="15"/>
                                            <xs:pattern value="[0-9]{1,12}[,][0-9]{2}"/>
                                          </xs:restriction>
                                        </xs:simpleType>
                                      </xs:element>
                                      <xs:element name="vlrRetApur" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Valor da apuracao da retencao que deve sofrer a associacao desportiva</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                            <xs:minLength value="4"/>
                                            <xs:maxLength value="15"/>
                                            <xs:pattern value="[0-9]{1,12}[,][0-9]{2}"/>
                                          </xs:restriction>
                                        </xs:simpleType>
                                      </xs:element>
                                    </xs:sequence>
                                  </xs:complexType>
                                </xs:element>
                                <xs:element name="infoProc" minOccurs="0" maxOccurs="50">
                                  <xs:annotation>
                                    <xs:documentation>Informacoes de processos administrativos/judiciais</xs:documentation>
                                  </xs:annotation>
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="tpProc" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Tipo de Processo</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="nrProc" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Numero do Processo</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                            <xs:minLength value="3"/>
                                            <xs:maxLength value="21"/>
                                          </xs:restriction>
                                        </xs:simpleType>
                                      </xs:element>
                                      <xs:element name="codSusp" minOccurs="0" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Codigo do indicativo da suspensao</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                            <xs:pattern value="[0-9]{1,14}"/>
                                          </xs:restriction>
                                        </xs:simpleType>
                                      </xs:element>
                                      <xs:element name="vlrNRet" minOccurs="1" maxOccurs="1">
                                        <xs:annotation>
                                          <xs:documentation>Valor da retencao que deixou de ser efetuada</xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                            <xs:minLength value="4"/>
                                            <xs:maxLength value="15"/>
                                            <xs:pattern value="[0-9]{1,12}[,][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:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" use="required">
              <xs:annotation>
                <xs:documentation>Identificacao unica 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:schema>
