<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:simpleType name="DataFormatoBrasil">
    <xsd:restriction base="xsd:string">
      <xsd:length value="10"/>
      <xsd:pattern value="(((0[1-9]|[1,2][0-9])/02)|((0[1-9]|[1,2][0-9]|30)/(0[4,6,9]|11))|((0[1-9]|[1,2][0-9]|3[0,1])/(0[1,3,5,7,8]|1[0,2])))/[1,2][0-9]{3}"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:simpleType name="FormatoSeloOriginal">
    <xsd:restriction base="xsd:string">
	  <xsd:minLength value="8"/>
	  <xsd:maxLength value="9"/>
      <xsd:pattern value="^[A-Z]{3,4}[0-9]{5}$"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:simpleType name="FormatoSelo">
    <xsd:restriction base="xsd:string">
      <xsd:length value="9"/>
      <xsd:pattern value="^[A-Z]{4}[0-9]{5}$"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:simpleType name="FormatoAleatorio">
    <xsd:restriction base="xsd:string">
      <xsd:length value="3"/>
      <xsd:pattern value="^[A-Z]{3}$"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:simpleType name="CodigoServico">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="5"/>
      <xsd:pattern value="^[0-9]{1,5}$"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  
  
  <!-- Define o tipo complexo  -->
  
  <xsd:complexType name="Ato">
	<xsd:attribute name="DataPratica" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="DataFormatoBrasil"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Selo" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoSelo"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Aleatorio" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoAleatorio"/>
	  </xsd:simpleType>
	</xsd:attribute>		
	<xsd:attribute name="CodServicoAtoOriginal">
	  <xsd:simpleType>
		<xsd:restriction base="CodigoServico"/>
	  </xsd:simpleType>
	</xsd:attribute>		
	<xsd:attribute name="SeloAtoOriginal">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoSeloOriginal"/>
	  </xsd:simpleType>
	</xsd:attribute>		
	<xsd:attribute name="AleatorioAtoOriginal">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoAleatorio"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="CodServicoAtoReferencia">
	  <xsd:simpleType>
		<xsd:restriction base="CodigoServico"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="SeloAtoReferencia">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoSeloOriginal"/>
	  </xsd:simpleType>
	</xsd:attribute>		
	<xsd:attribute name="AleatorioAtoReferencia">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoAleatorio"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="DataInicioEficacia" >
	  <xsd:simpleType>
		<xsd:restriction base="DataFormatoBrasil"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="DataFimEficacia" >
	  <xsd:simpleType>
		<xsd:restriction base="DataFormatoBrasil"/>
	  </xsd:simpleType>
	</xsd:attribute>	
	<xsd:attribute name="IndCertidaoEletronica" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		  <xsd:enumeration value="S"/>
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="IndAtoEletronico" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		  <xsd:enumeration value="S"/>
		  <xsd:enumeration value="N"/>
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="UrlPDFAto" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		   <xsd:minLength value="2"/>
		   <xsd:maxLength value="2083"/>						
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="HashPDFAto" >
	  <xsd:simpleType>
		 <xsd:restriction base="xsd:string">
          <xsd:length fixed="true" value="64"/>
         </xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="UrlDossie" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		   <xsd:minLength value="2"/>
		   <xsd:maxLength value="2083"/>						
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="HashDossie" >
	  <xsd:simpleType>
		 <xsd:restriction base="xsd:string">
          <xsd:length fixed="true" value="64"/>
         </xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
  </xsd:complexType>

  <xsd:complexType name="Transmissao" abstract="true">
    <xsd:attribute name="DataPratica" use="required">
      <xsd:simpleType>
        <xsd:restriction base="DataFormatoBrasil"/>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="CCT" use="required">
      <xsd:simpleType>
        <xsd:restriction base="FormatoSelo"/>
      </xsd:simpleType>
    </xsd:attribute>
	<xsd:attribute name="IndAtoEletronico" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		  <xsd:enumeration value="S"/>
		  <xsd:enumeration value="N"/>
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="UrlPDFAto" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		   <xsd:minLength value="2"/>
		   <xsd:maxLength value="2083"/>						
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="HashPDFAto" >
	  <xsd:simpleType>
		 <xsd:restriction base="xsd:string">
          <xsd:length fixed="true" value="64"/>
         </xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="UrlDossie" >
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		   <xsd:minLength value="2"/>
		   <xsd:maxLength value="2083"/>						
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="HashDossie" >
	  <xsd:simpleType>
		 <xsd:restriction base="xsd:string">
          <xsd:length fixed="true" value="64"/>
         </xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
  </xsd:complexType>
  
  <xsd:complexType name="ElementoJustificativaAtoNaoPraticado">
	<xsd:attribute name="Data" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="DataFormatoBrasil"/>
	  </xsd:simpleType>
	</xsd:attribute>
  </xsd:complexType>
  
  <xsd:complexType name="AtoDistribuicaoJudicial">
	<xsd:attribute name="DataPratica" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="DataFormatoBrasil"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Selo">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoSelo"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Aleatorio">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoAleatorio"/>
	  </xsd:simpleType>
	</xsd:attribute>
    <xsd:attribute name="CCT">
      <xsd:simpleType>
        <xsd:restriction base="FormatoSelo"/>
      </xsd:simpleType>
    </xsd:attribute>
	<xsd:attribute name="TipoAto" use="required">   
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:enumeration value="R"/>
				<xsd:enumeration value="B"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="NumeroProcesso" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="20"/>
				<xsd:maxLength value="25"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Livro" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="2"/>
				<xsd:maxLength value="25"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="NumeroRegistro" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="2"/>
				<xsd:maxLength value="25"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Oficio" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="2"/>
				<xsd:maxLength value="25"/>
	        </xsd:restriction>
	    </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="CodServicoAtoVinculado">
	  <xsd:simpleType>
		<xsd:restriction base="CodigoServico"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="SeloAtoVinculado">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoSeloOriginal"/>
	  </xsd:simpleType>
	</xsd:attribute>		
	<xsd:attribute name="AleatorioAtoVinculado">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoAleatorio"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="TipoBaixa">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="2"/>
				<xsd:maxLength value="250"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
  </xsd:complexType>  

  <xsd:complexType name="AtoDistribuicaoExtrajudicial">
	<xsd:complexContent> 
		<xsd:extension base="Ato">
			<xsd:sequence> 
				<xsd:element name="Participantes" type="tpParticipantes" minOccurs="1" maxOccurs="1"/>
				<xsd:element name="AtosVinculados" type="tpAtosVinculados" minOccurs="0" maxOccurs="1"/>	
				<xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="TipoAto" use="required">   
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="R"/>
						<xsd:enumeration value="A"/>
						<xsd:enumeration value="F"/>
						<xsd:enumeration value="C"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="TipoDistribuicao" use="required">   
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="DRDHC"/>
						<xsd:enumeration value="DRDAN"/>
						<xsd:enumeration value="DRDTD"/>
						<xsd:enumeration value="DRDPT"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	  	    <xsd:attribute name="Livro">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
					    <xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="Assunto">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="1"/>
						<xsd:maxLength value="2"/>
						<xsd:pattern value="^[0-9]{1,2}$"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			 <xsd:attribute name="DescricaoLivro">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
					    <xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	        <xsd:attribute name="NumeroRegistro" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	        <xsd:attribute name="DescricaoAto" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="2"/>
			            <xsd:maxLength value="250"/>
			        </xsd:restriction>
		        </xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="RequerimentoCancelamento">
				<xsd:simpleType>
				    <xsd:restriction base="xsd:string">
				        <xsd:minLength value="2"/>
				        <xsd:maxLength value="25"/>
				    </xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:extension>
	</xsd:complexContent> 
  </xsd:complexType>
  
  <xsd:complexType name="AtoDistribuicaoProtesto">
	<xsd:complexContent> 
		<xsd:extension base="Transmissao">
			<xsd:sequence> 
				<xsd:element name="Participantes" type="tpParticipantes" minOccurs="1" maxOccurs="1"/>
				<xsd:element name="AtosVinculados" type="tpAtosVinculados" minOccurs="0" maxOccurs="1"/>	
				<xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="TipoAto" use="required">   
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="R"/>					
						<xsd:enumeration value="C"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>			
	  	    <xsd:attribute name="Livro">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
					    <xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="Assunto">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="1"/>
						<xsd:maxLength value="2"/>
						<xsd:pattern value="^[0-9]{1,2}$"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			 <xsd:attribute name="DescricaoLivro">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
					    <xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	        <xsd:attribute name="NumeroRegistro" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	        <xsd:attribute name="DescricaoAto" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="2"/>
			            <xsd:maxLength value="250"/>
			        </xsd:restriction>
		        </xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="RequerimentoCancelamento">
				<xsd:simpleType>
				    <xsd:restriction base="xsd:string">
				        <xsd:minLength value="2"/>
				        <xsd:maxLength value="25"/>
				    </xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:extension>
	</xsd:complexContent> 
  </xsd:complexType>

  <xsd:complexType name="AtoDistribuicaoEletronica">
     <xsd:sequence>
        <xsd:element name="AtosVinculados" type="tpAtosVinculados" minOccurs="1" maxOccurs="1"/>
        <xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
     </xsd:sequence>
    <xsd:attribute name="DataPratica" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="DataFormatoBrasil"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Selo" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoSelo"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Aleatorio" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="FormatoAleatorio"/>
	  </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="TipoOperacaoDistribuicao" use="required">
	  <xsd:simpleType>
		<xsd:restriction base="xsd:string">
		  <xsd:enumeration value="R"/>
		  <xsd:enumeration value="F"/>
		</xsd:restriction>
	  </xsd:simpleType>
	</xsd:attribute>
  </xsd:complexType>

  <xsd:complexType name="AtoCertidao">
	<xsd:complexContent> 
		<xsd:extension base="Ato">
			<xsd:sequence>
				<xsd:element name="Participantes" type="tpParticipantes" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="Imoveis" type="ImoveisAto" minOccurs="0" maxOccurs="1"/>	
				<xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence> 
			<xsd:attribute name="TipoCertidao" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
				        <xsd:enumeration value="DCFJC"/>
				        <xsd:enumeration value="DCFJR"/>
						<xsd:enumeration value="DCFJE"/>
				        <xsd:enumeration value="DCFJF"/>
				        <xsd:enumeration value="DCDPT"/>
				        <xsd:enumeration value="DCDPD"/>
				        <xsd:enumeration value="DCRDA"/>
						<xsd:enumeration value="DCRDH"/>
						<xsd:enumeration value="DCBFJ"/>
				    </xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	  	    <xsd:attribute name="NumeroAto" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="2"/>
					    <xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
	        <xsd:attribute name="QuantidadeDistribuicao" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="1"/>
						<xsd:maxLength value="5"/>
						<xsd:pattern value="^[0-9]{1,5}$"/>
					</xsd:restriction>
				</xsd:simpleType>
	  		</xsd:attribute>
			<xsd:attribute name="QtdFolhasExcedentes" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="1"/>
					    <xsd:maxLength value="6"/>
						<xsd:pattern value="^[0-9]{1,6}$"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="Livro">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
					    <xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="NumeroRegistro">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="2"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:extension>
	</xsd:complexContent> 
  </xsd:complexType>
  
  <xsd:complexType name="AtoVisto">
	<xsd:complexContent> 
		<xsd:extension base="AtoCertidao">
			<xsd:attribute name="Revalidada" use="required">
			    <xsd:simpleType>
					<xsd:restriction base="xsd:string">
					    <xsd:enumeration value="S"/>
					    <xsd:enumeration value="N"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:extension>
	</xsd:complexContent> 
  </xsd:complexType>   

  <xsd:complexType name="tpFolhaAdicionalComplemento">
    <xsd:complexContent>
      <xsd:extension base="Transmissao">
        <xsd:sequence>
          <xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="SeloAtoOriginal" use="required">
          <xsd:simpleType>
            <xsd:restriction base="FormatoSeloOriginal"/>
          </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="AleatorioAtoOriginal" use="required">
          <xsd:simpleType>
            <xsd:restriction base="FormatoAleatorio"/>
          </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="QtdFolhasExcedentes" use="required">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:minLength value="1"/>
              <xsd:maxLength value="6"/>
              <xsd:pattern value="^[0-9]{1,6}$"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <xsd:complexType name="tpInformacaoVerbal">
    <xsd:complexContent>
      <xsd:extension base="Transmissao">
        <xsd:sequence>
          <xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="NumeroAto" use="required">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:minLength value="2"/>
              <xsd:maxLength value="25"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="Nome" use="required">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:minLength value="2"/>
              <xsd:maxLength value="200"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <xsd:complexType name="AtoEncerramentoLivro">
    <xsd:complexContent>
    <xsd:extension base="Transmissao">	  
		<xsd:attribute name="Livro" use="required">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
				 <xsd:minLength value="2"/>
				 <xsd:maxLength value="25"/>
				</xsd:restriction>	        </xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="QtdTotalFolhas" use="required">
             <xsd:simpleType>
              <xsd:restriction base="xsd:string">
                <xsd:minLength value="1"/>
                <xsd:maxLength value="6"/>
                <xsd:pattern value="^[0-9]{1,6}$"/>
              </xsd:restriction>
             </xsd:simpleType>
            </xsd:attribute>			
		    <xsd:attribute name="IdentificacaoLivro" use="required">
			 <xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:minLength value="2"/>
					<xsd:maxLength value="100"/>
				</xsd:restriction>
			 </xsd:simpleType>
		    </xsd:attribute>
			<xsd:attribute name="DataEncerramento" use="required">
			 <xsd:simpleType>
				<xsd:restriction base="DataFormatoBrasil"/>
			 </xsd:simpleType>
		    </xsd:attribute>
     </xsd:extension>
    </xsd:complexContent>
   </xsd:complexType>

  <xsd:complexType name="AtoComplementoEmolumentos">
    <xsd:complexContent>
      <xsd:extension base="Transmissao">
        <xsd:sequence>
          <xsd:element name="AtosVinculados" type="tpAtosVinculados" minOccurs="1" maxOccurs="1"/>
          <xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <xsd:complexType name="AtoAlteracaoEmolumentos">
        <xsd:sequence>
           <xsd:element name="Emolumentos" type="tpEmolumentos" minOccurs="1" maxOccurs="1"/>         
        </xsd:sequence>
		<xsd:attribute name="Selo" use="required">
	      <xsd:simpleType>
		    <xsd:restriction base="FormatoSelo"/>
	      </xsd:simpleType>
	    </xsd:attribute>	
  </xsd:complexType>
  
  
  <xsd:complexType name="tpParticipantes">
	<xsd:sequence> 
		<xsd:element name="Participante"  minOccurs="1" maxOccurs="unbounded">  
			<xsd:complexType>
				<xsd:attribute name="Tipo" use="required">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:minLength value="1"/>
					        <xsd:maxLength value="3"/>
			              	<xsd:pattern value="^[0-9]{1,3}$"/>
					    </xsd:restriction>
				    </xsd:simpleType>
			    </xsd:attribute>
				<xsd:attribute name="TipoPessoa" use="required">
					<xsd:simpleType>
					    <xsd:restriction base="xsd:string">
						    <xsd:enumeration value="F"/>
						    <xsd:enumeration value="J"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
		  	    <xsd:attribute name="Nome" use="required">
				    <xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:minLength value="2"/>
						    <xsd:maxLength value="200"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
		  	    <xsd:attribute name="CPFCNPJ">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:minLength value="11"/>
							<xsd:maxLength value="18"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
				<xsd:attribute name="JustificativaAusenciaCPFCNPJ" >
                   <xsd:simpleType>
                     <xsd:restriction base="xsd:string">
                        <xsd:enumeration value="1"/>
                        <xsd:enumeration value="2"/>
                        <xsd:enumeration value="3"/>                     
                     </xsd:restriction>
                   </xsd:simpleType>
                </xsd:attribute>
			</xsd:complexType> 
		</xsd:element>
	</xsd:sequence> 
  </xsd:complexType>
  
  <xsd:complexType name="ImoveisAto">
	<xsd:sequence> 
		<xsd:element name="Imovel"  minOccurs="1" maxOccurs="unbounded">  
			<xsd:complexType>
				<xsd:attribute name="Endereco" use="required">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:minLength value="2"/>
					        <xsd:maxLength value="250"/>
					    </xsd:restriction>
				    </xsd:simpleType>
			    </xsd:attribute>
				<xsd:attribute name="Inscricao" >
					<xsd:simpleType>
					    <xsd:restriction base="xsd:string">
						    <xsd:minLength value="2"/>
					        <xsd:maxLength value="25"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
			</xsd:complexType> 
		</xsd:element>
	</xsd:sequence> 
  </xsd:complexType>

  <xsd:complexType name="tpAtosVinculados">
    <xsd:sequence>
      <xsd:element name="AtoVinculado" minOccurs="1" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:attribute name="TipoVinculo" use="required">
            <xsd:simpleType>
              <xsd:restriction base="xsd:string">
                <xsd:enumeration value="M"/>
				<xsd:enumeration value="O"/>
              </xsd:restriction>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="CodigoServico">
            <xsd:simpleType>
              <xsd:restriction base="CodigoServico"/>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="Selo">
            <xsd:simpleType>
              <xsd:restriction base="FormatoSeloOriginal"/>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="Aleatorio">
            <xsd:simpleType>
              <xsd:restriction base="FormatoAleatorio"/>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="TipoSelo">
            <xsd:simpleType>
              <xsd:restriction base="xsd:string">
                <xsd:enumeration value="F"/>
                <xsd:enumeration value="E"/>
              </xsd:restriction>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="CCT" >
            <xsd:simpleType>
              <xsd:restriction base="FormatoSelo"/>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="DataPratica">
            <xsd:simpleType>
              <xsd:restriction base="DataFormatoBrasil"/>
            </xsd:simpleType>
          </xsd:attribute>
          <xsd:attribute name="NumeroProtocolo">
            <xsd:simpleType>
              <xsd:restriction base="xsd:string">
                <xsd:minLength value="2" />
                <xsd:maxLength value="25" />
              </xsd:restriction>
            </xsd:simpleType>
          </xsd:attribute>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <xsd:complexType name="tpEmolumentos">
	<xsd:sequence> 
		<xsd:element name="ItemEmolumento" minOccurs="0" maxOccurs="100">
			<xsd:complexType>
        <xsd:attribute name="Ano" >
          <xsd:simpleType>
            <xsd:restriction base="xsd:gYear"/>
          </xsd:simpleType>
        </xsd:attribute>
				<xsd:attribute name="Tabela" use="required">  
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:minLength value="1"/>
					        <xsd:maxLength value="8"/>
					    </xsd:restriction>
				    </xsd:simpleType>
			    </xsd:attribute>
				<xsd:attribute name="Item" use="required"> 
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:minLength value="1"/>
					        <xsd:maxLength value="20"/>
					    </xsd:restriction>
				    </xsd:simpleType>
				</xsd:attribute>
				<xsd:attribute name="SubItem"> 
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
					        <xsd:maxLength value="20"/>
					    </xsd:restriction>
				    </xsd:simpleType>
  			    </xsd:attribute>
		  	    <xsd:attribute name="Quantidade" use="required">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
						    <xsd:minLength value="1"/>
						    <xsd:maxLength value="4"/>
 				            <xsd:pattern value="^[0-9]{1,4}$"/>
						</xsd:restriction>
			        </xsd:simpleType>
				</xsd:attribute>
		  	    <xsd:attribute name="Complemento">
				    <xsd:simpleType>
				        <xsd:restriction base="xsd:string">
   				            <xsd:minLength value="2"/>
				            <xsd:maxLength value="200"/>
				        </xsd:restriction>
				    </xsd:simpleType>
				</xsd:attribute>
		  	    <xsd:attribute name="Excecao">
				    <xsd:simpleType>
						<xsd:restriction base="xsd:string">
						    <xsd:minLength value="2"/>
						    <xsd:maxLength value="200"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
			</xsd:complexType> 
		</xsd:element>
	</xsd:sequence> 
	<xsd:attribute name="TipoCobranca" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:enumeration value="JG"/>
			    <xsd:enumeration value="CC"/>
			    <xsd:enumeration value="SC"/>
			    <xsd:enumeration value="NH"/>
				<xsd:enumeration value="FL"/>
				<xsd:enumeration value="CV"/>
				<xsd:enumeration value="PL"/>
				<xsd:enumeration value="PC"/>
				<xsd:enumeration value="AS"/>
				<xsd:enumeration value="PS"/>
				<xsd:enumeration value="NC"/>
				<xsd:enumeration value="NL"/>
				<xsd:enumeration value="NS"/>
				<xsd:enumeration value="PR"/>	
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="ValorTotalEmolumentos">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
				<xsd:minInclusive value="0"/>
				<xsd:totalDigits value="12"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="FETJ">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
				<xsd:minInclusive value="0"/>
				<xsd:totalDigits value="12"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="FUNDPERJ">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
	   		    <xsd:minInclusive value="0"/>
	   		    <xsd:totalDigits value="12"/>
		    </xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="FUNPERJ">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
	   		    <xsd:minInclusive value="0"/>
	   		    <xsd:totalDigits value="12"/>
			</xsd:restriction>
        </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="FUNPGALERJ">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
	   		    <xsd:minInclusive value="0"/>
	   		    <xsd:totalDigits value="12"/>
			</xsd:restriction>
        </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="FUNPGT">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
	   		    <xsd:minInclusive value="0"/>
	   		    <xsd:totalDigits value="12"/>
			</xsd:restriction>
        </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="FUNDAC_PGUERJ">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
	   		    <xsd:minInclusive value="0"/>
	   		    <xsd:totalDigits value="12"/>
			</xsd:restriction>
        </xsd:simpleType>
	</xsd:attribute>
    <xsd:attribute name="FUNARPEN">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
	   		    <xsd:minInclusive value="0"/>
	   		    <xsd:totalDigits value="12"/>
		    </xsd:restriction>
        </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="RESSAG">
		<xsd:simpleType>
			<xsd:restriction base="xsd:decimal">
				<xsd:fractionDigits value="2"/>
				<xsd:minInclusive value="0"/>
				<xsd:totalDigits value="12"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="ValorSeloEletronico">
	  <xsd:simpleType>
        <xsd:restriction base="xsd:decimal">
          <xsd:fractionDigits value="2"/>
          <xsd:minInclusive value="0"/>
          <xsd:totalDigits value="12"/>
        </xsd:restriction>
      </xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="ValorISS">
	  <xsd:simpleType>
        <xsd:restriction base="xsd:decimal">
          <xsd:fractionDigits value="2"/>
          <xsd:minInclusive value="0"/>
          <xsd:totalDigits value="12"/>
        </xsd:restriction>
      </xsd:simpleType>
	</xsd:attribute>
  </xsd:complexType>   

  <xsd:complexType name="RemessaAtos">
  
	<xsd:sequence maxOccurs="unbounded">  
		<xsd:element name="JustificativaAtoNaoPraticado" type="ElementoJustificativaAtoNaoPraticado" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="DistribuicaoJudicial" type="AtoDistribuicaoJudicial" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="DistribuicaoExtrajudicial" type="AtoDistribuicaoExtrajudicial" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="DistribuicaoProtesto" type="AtoDistribuicaoProtesto" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="DistribuicaoEletronica" type="AtoDistribuicaoEletronica" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="Certidao" type="AtoCertidao" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="Visto" type="AtoVisto" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="FolhaAdicionalComplemento" type="tpFolhaAdicionalComplemento" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="InformacaoVerbal" type="tpInformacaoVerbal" minOccurs="0" maxOccurs="unbounded"/>
		<xsd:element name="EncerramentoLivro" type="AtoEncerramentoLivro" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="ComplementoEmolumentos" type="AtoComplementoEmolumentos" minOccurs="0" maxOccurs="unbounded"/>
	<xsd:element name="AlteracaoEmolumentos" type="AtoAlteracaoEmolumentos" minOccurs="0" maxOccurs="unbounded"/>
	</xsd:sequence> 
	<xsd:attribute name="Id" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:maxLength value="25"/>
				<xsd:pattern value="^[0-9]{1,25}$"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="CodServico" use="required">   
		<xsd:simpleType>
			<xsd:restriction base="CodigoServico"/>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="TipoOperacao" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:enumeration value="I"/>
				<xsd:enumeration value="A"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Software">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="2"/>
				<xsd:maxLength value="100"/>       
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Ambiente" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:enumeration value="HML"/>
				<xsd:enumeration value="PRD"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>	
  </xsd:complexType>    
 
 <xsd:complexType name="tpCertidaoEletronica">
	<xsd:choice>  
		<xsd:element name="Certidao" type="AtoCertidao" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="Visto" type="AtoVisto" minOccurs="0" maxOccurs="1"/>
	</xsd:choice> 
	<xsd:attribute name="Id" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:maxLength value="25"/>
				<xsd:pattern value="^[0-9]{1,25}$"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="CodServico" use="required">   
		<xsd:simpleType>
			<xsd:restriction base="CodigoServico"/>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="IdPedidoCentral" >
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="0"/>
				<xsd:maxLength value="50"/>       
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="IdCertidao" >
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="0"/>
				<xsd:maxLength value="50"/>       
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="HashPDF" >
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="0"/>
				<xsd:maxLength value="1000"/>       
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Software">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:minLength value="2"/>
				<xsd:maxLength value="100"/>       
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>
	<xsd:attribute name="Ambiente" use="required">
		<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:enumeration value="HML"/>
				<xsd:enumeration value="PRD"/>
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:attribute>	
  </xsd:complexType>    
	  
  <!-- estrutura que o documento precisa estar em conformidade.
       Ela inicia com o elemento RegistroDistribuicao que aninha outros elementos. -->
       
  <xsd:element name="RegistroDistribuicao">
	<xsd:complexType>
		<xsd:choice> 
			<xsd:sequence> 
				<xsd:element name="Remessa" type="RemessaAtos" minOccurs="1" maxOccurs="1"/>
				<xsd:element name="AssinaturaRemessa" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence> 
			<xsd:sequence> 
				<xsd:element name="CertidaoEletronica" type="tpCertidaoEletronica" minOccurs="1" maxOccurs="1"/>
				<xsd:element name="AssinaturaCertidaoEletronica" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="AssinaturaRemessa" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence> 
		</xsd:choice> 
		<xsd:attribute name="VersaoLayout" use="required">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:minLength value="1"/>
					<xsd:maxLength value="20"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>		
    </xsd:complexType>
  </xsd:element>
  
</xsd:schema>