<?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/evtExpRisco/v02_04_02" targetNamespace="http://www.esocial.gov.br/schema/evt/evtExpRisco/v02_04_02" 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="evtExpRisco">
          <xs:annotation>
            <xs:documentation>Evento Condições Ambientais do Trabalho - Fatores de Risco</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ideEvento" type="TIdeEveTrab">
                <xs:annotation>
                  <xs:documentation>Informações de Identificação do Evento</xs:documentation>
                </xs:annotation>
              </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="ideVinculo" type="TIdeVincEstagCoop">
                <xs:annotation>
                  <xs:documentation>Informações de Identificação do Trabalhador e do Vínculo. Aplicar uma das seguintes regras, de acordo com a categoria do trabalhador.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="infoExpRisco">
                <xs:annotation>
                  <xs:documentation>Informações sobre o ambiente de trabalho, atividades desempenhadas e exposição a fatores de risco</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="iniExpRisco" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Condições ambientais do trabalho - Início</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="dtIniCondicao">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Data de Início da Condição</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:date">
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="infoAmb" type="TinfoAmb" maxOccurs="99">
                            <xs:annotation>
                              <xs:documentation>Informações relativas ao ambiente de trabalho</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="altExpRisco" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Condições ambientais do trabalho - Alteração</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="dtAltCondicao">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Data de Alteração da Condição</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:date">
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="infoAmb" type="TinfoAmb" maxOccurs="99">
                            <xs:annotation>
                              <xs:documentation>Informações relativas ao ambiente de trabalho</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="fimExpRisco" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Condições ambientais do trabalho - Fim</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="dtFimCondicao">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Data Término da Condição Diferenciada</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:date">
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="infoAmb" maxOccurs="99">
                            <xs:annotation>
                              <xs:documentation>Informações relativas ao ambiente de trabalho</xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="codAmb">
                                  <xs:simpleType>
                                    <xs:annotation>
                                      <xs:documentation>Código do Ambiente de Trabalho</xs:documentation>
                                    </xs:annotation>
                                    <xs:restriction base="xs:string">
                                      <xs:minLength value="1"/>
                                      <xs:maxLength value="30"/>
                                    </xs:restriction>
                                  </xs:simpleType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="respReg" maxOccurs="9">
                      <xs:annotation>
                        <xs:documentation>Informações relativas ao responsável pelos registros ambientais</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="dtIni">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Data de Início</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:date">
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="dtFim" minOccurs="0">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Data Fim</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:date">
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="nisResp">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>NIS do responsável pela monitoração</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:length value="11"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="nrOc">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Inscr no órgão de classe</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:whiteSpace value="preserve"/>
                                <xs:minLength value="3"/>
                                <xs:maxLength value="14"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="ufOC" minOccurs="0">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:documentation>Sigla da UF do órgão de classe</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:string">
                                <xs:enumeration value="AC"/>
                                <xs:enumeration value="AL"/>
                                <xs:enumeration value="AP"/>
                                <xs:enumeration value="AM"/>
                                <xs:enumeration value="BA"/>
                                <xs:enumeration value="CE"/>
                                <xs:enumeration value="DF"/>
                                <xs:enumeration value="ES"/>
                                <xs:enumeration value="GO"/>
                                <xs:enumeration value="MA"/>
                                <xs:enumeration value="MT"/>
                                <xs:enumeration value="MS"/>
                                <xs:enumeration value="MG"/>
                                <xs:enumeration value="PA"/>
                                <xs:enumeration value="PB"/>
                                <xs:enumeration value="PR"/>
                                <xs:enumeration value="PE"/>
                                <xs:enumeration value="PI"/>
                                <xs:enumeration value="RJ"/>
                                <xs:enumeration value="RN"/>
                                <xs:enumeration value="RS"/>
                                <xs:enumeration value="RO"/>
                                <xs:enumeration value="RR"/>
                                <xs:enumeration value="SC"/>
                                <xs:enumeration value="SP"/>
                                <xs:enumeration value="SE"/>
                                <xs:enumeration value="TO"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </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="TIdeEveTrab">
    <xs:annotation>
      <xs:documentation>Identificação do evento</xs:documentation>
    </xs:annotation>
    <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>Recibo 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="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:complexType name="TEmpregador">
    <xs:sequence>
      <xs:element name="tpInsc">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>Tipo de Inscrição, conforme tabela 5.</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,15}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TIdeVincEstagCoop">
    <xs:annotation>
      <xs:documentation>Informações do vínculo - empregados, estagiários e cooperados</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="cpfTrab">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>CPF do trabalhador</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
            <xs:length value="11"/>
            <xs:pattern value="\d{11}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="nisTrab" minOccurs="0">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>NIS</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
            <xs:maxLength value="11"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="matricula" minOccurs="0">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>Matricula</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="30"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TinfoAmb">
    <xs:annotation>
      <xs:documentation>Detalha o(s) Ambiente(s) de Trabalho em que o trabalhador desempenha atividades.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="codAmb">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>Código do Ambiente de Trabalho</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="30"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="infoAtiv">
        <xs:annotation>
          <xs:documentation>Descrição das Atividades Desempenhadas</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="dscAtivDes">
              <xs:simpleType>
                <xs:annotation>
                  <xs:documentation>Descrição das atividades, físicas ou mentais</xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string">
                  <xs:whiteSpace value="preserve"/>
                  <xs:minLength value="3"/>
                  <xs:maxLength value="999"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="fatRisco" maxOccurs="999">
        <xs:annotation>
          <xs:documentation>Fator de risco ao qual o trabalhador está exposto na atividade exercida no ambiente</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="codFatRis">
              <xs:simpleType>
                <xs:annotation>
                  <xs:documentation>Código do fator de risco</xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string">
                  <xs:minLength value="4"/>
                  <xs:maxLength value="10"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="intConc" minOccurs="0">
              <xs:simpleType>
                <xs:annotation>
                  <xs:documentation>Intensidade/Concentração</xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="15"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="tecMedicao" minOccurs="0">
              <xs:simpleType>
                <xs:annotation>
                  <xs:documentation>Técnica utilizada para medição</xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string">
                  <xs:whiteSpace value="preserve"/>
                  <xs:minLength value="2"/>
                  <xs:maxLength value="40"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="epcEpi">
              <xs:annotation>
                <xs:documentation>Informações relativas a Equipamentos de Proteção Coletiva - EPC e Equipamentos de Proteção Individual - EPI</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="utilizEPC">
                    <xs:simpleType>
                      <xs:annotation>
                        <xs:documentation>Utilização de EPC</xs:documentation>
                      </xs:annotation>
                      <xs:restriction base="xs:byte">
                        <xs:pattern value="\d"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="utilizEPI">
                    <xs:simpleType>
                      <xs:annotation>
                        <xs:documentation>Utiliza EPI</xs:documentation>
                      </xs:annotation>
                      <xs:restriction base="xs:byte">
                        <xs:pattern value="\d"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="epc" minOccurs="0" maxOccurs="50">
                    <xs:annotation>
                      <xs:documentation>Equipamentos de Proteção Coletiva - EPC</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="dscEpc">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Descrição do EPC</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:whiteSpace value="preserve"/>
                              <xs:minLength value="3"/>
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="eficEpc" minOccurs="0">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Eficácia do EPC</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:pattern value="[N|S]"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="epi" minOccurs="0" maxOccurs="50">
                    <xs:annotation>
                      <xs:documentation>Equipamentos de Proteção Individual - EPI</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="caEPI" minOccurs="0">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Certificado de Aprovação do EPI</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:whiteSpace value="preserve"/>
                              <xs:maxLength value="20"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="eficEpi">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>O EPI é eficaz?
                              </xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:pattern value="[N|S]"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="medProtecao">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Medidas de proteção coletiva?</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                              <xs:pattern value="[N|S]"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="condFuncto">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Condições de funcionamento do EPI</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                              <xs:pattern value="[N|S]"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="przValid">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Foi observado o prazo de validade, conforme Certificado de Aprovação - CA do MTE?</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                              <xs:pattern value="[N|S]"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="periodicTroca">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Periodicidade de troca</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                              <xs:pattern value="[N|S]"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="higienizacao">
                          <xs:simpleType>
                            <xs:annotation>
                              <xs:documentation>Foi observada a higienização?</xs:documentation>
                            </xs:annotation>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                              <xs:pattern value="[N|S]"/>
                            </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:schema>
