<?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.esocial.gov.br/schema/evt/evtContrSindPatr/v02_05_00" targetNamespace="http://www.esocial.gov.br/schema/evt/evtContrSindPatr/v02_05_00" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
  <xs:element name="eSocial">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="evtContrSindPatr">
          <xs:annotation>
            <xs:documentation>Contribuição sindical patronal</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ideEvento">
                <xs:annotation>
                  <xs:documentation>Informações de identificação do evento</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="indRetif">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Indicativo de Retificação</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:byte">
                          <xs:pattern value="\d"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="nrRecibo" minOccurs="0">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Número do recibo do arquivo a ser retificado</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="40"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="indApuracao">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Indicativo de período de apuração</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:byte">
                          <xs:pattern value="\d"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="perApur">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Período ao qual se referem as informações</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="4"/>
                          <xs:maxLength value="7"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="tpAmb">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Tipo de ambiente</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:byte">
                          <xs:pattern value="\d"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="procEmi">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Processo de emissão do evento</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:byte">
                          <xs:pattern value="\d"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="verProc">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Versão do processo de emissão do evento</xs:documentation>
                        </xs:annotation>
                        <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="ideEmpregador" type="TEmpregador">
                <xs:annotation>
                  <xs:documentation>Informações de identificação do empregador</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="contribSind" maxOccurs="999">
                <xs:annotation>
                  <xs:documentation>Informações da contribuição sindical patronal</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="cnpjSindic">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>CNPJ da Entidade Sindical Beneficiária</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:string">
                          <xs:pattern value="\d{14}"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="tpContribSind">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Tipo de contribuição sindical</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:byte">
                          <xs:pattern value="\d"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="vlrContribSind">
                      <xs:simpleType>
                        <xs:annotation>
                          <xs:documentation>Valor da contribuição sindical</xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:decimal">
                          <xs:totalDigits value="14"/>
                          <xs:fractionDigits value="2"/>
                          <xs:maxInclusive value="999999999999"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="Id" type="xs:ID" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element ref="ds:Signature"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="TEmpregador">
    <xs:sequence>
      <xs:element name="tpInsc">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>Tipo de Inscrição, conforme Tabela 05</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:byte">
            <xs:pattern value="\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="nrInsc">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>Número de Inscrição</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
            <xs:pattern value="\d{8,14}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
