Entry for National Laws / Brazil

This is a discussion about the submission for National Laws / Brazil.

I’m somewhat familiar with LexML, but I am still not sure if the dataset qualifies. Some questions:

  1. From the LexML’s SRU webservice, how do I get to the content of the legislation? Here’s an example query:
<srw:searchRetrieveResponse xmlns:srw_dc="info:srw/schema/1/dc-schema"
                            xmlns:dc="http://purl.org/dc/elements/1.1/"
                            xmlns:srw="http://www.loc.gov/zing/srw/"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema">
   <srw:version>1.1</srw:version>
   <srw:numberOfRecords>13</srw:numberOfRecords>
   <srw:records>
      <srw:record>
         <srw:recordPacking>XML</srw:recordPacking>
         <srw:recordSchema>info:srw/schema/1/dc-v1.1</srw:recordSchema>
         <srw:recordData>
            <srw_dc:dc xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/z3950/agency/zing/srw/dc-schema.xsd">
               <tipoDocumento>Decreto</tipoDocumento>
               <facet-tipoDocumento>Legislação::Decreto</facet-tipoDocumento>
               <dc:date>1942-02-14</dc:date>
               <urn>urn:lex:br:federal:decreto:1942-02-14;8777</urn>
               <localidade>Brasil</localidade>
               <facet-localidade>Brasil</facet-localidade>
               <autoridade>Federal</autoridade>
               <facet-autoridade>Federal</facet-autoridade>
               <dc:title>Decreto nº 8.777, de 14 de Fevereiro de 1942</dc:title>
               <dc:title>Decreto nº 8.777,  de 14 de fevereiro de 1942</dc:title>
               <dc:description>Suprime cargos extintos.</dc:description>
               <dc:description>SUPRIME CARGOS EXTINTOS.</dc:description>
               <dc:subject>DECLARAÇÃO, SUPRESSÃO, CARGO DE CARREIRA, QUADRO DE PESSOAL, MINISTERIO DA VIAÇÃO E OBRAS PUBLICAS.</dc:subject>
               <dc:type>html</dc:type>
               <dc:identifier>000741679</dc:identifier>
            </srw_dc:dc>
         </srw:recordData>
      </srw:record>

The first strange fact about this is the different number of results. Here are 13 results. The same query on the web interface returns 14 results.

Also, as you can see, there is only minimal metadata about each record in this search results. There is no link provided for another query to retrieve more detailed metadata, such as the one you can see on this page. More importantly, and relevant to the submission, is that I can’t find in this xml any links to the content of the document, the date of last amendment and the existing amendments.

As for the bulk download, the sitemap contains references to all the identifiers of legislation. However, the metadata is not there inside the bulk download, not to say the contents of legislation.

@ppkrauss, as you are more familiar with this than I am, perhaps you could clarify? Or perhaps the specialist @Wagner_Faria_de_Oliv consulted with about this dataset?

1 Like

Hi @augusto.herrmann, yes it is not so friendly. I think that any external resource will be considered “data scraping”… So something that helps, as okfn-brasil/getlex, can’t be cited.

LexML today is a repository of “only metadata”, no relevant database of “full content documents” in it (only some XML documents of legislative proposals).

The query shows a typical metadata retrieval, but as you see is incomplete, there are no URL: you need to submit the URN LEX to the URN-resolver (in this case Decreto nº 8.777, de 14 de Fevereiro de 1942 - DEC-8777-1942-02-14 - 8777/42 :: Legislação::Decreto 8777/1942 (Federal - Brasil) ::).

The bulk data retrieval is possible by http://www.lexml.gov.br/sitemap_index.xml but it only lists the URNs and update dates.

About “… the date of last amendment and the existing amendments…” (revogações, etc.), I imagine that there are no information to be retrieved: the project SILEX is on hold.


NOTE about the interface of submission for National Laws / Brazil: how to add “endorse item” or participate there? After login (and it ignored that I was an old user) the message is “You do not have permissions to review this submission”.

1 Like

Hello, @ppkrauss.

That is one of the reasons I asked on another topic to clarify the eligibility criteria for the National Laws dataset, as the measurement parameters should be uniform across all countries.

Suppose the criteria is “having the content is required, but it is not required that the content is structured and broken down into its constituent parts of the text”. In that case, I think that if a dataset does not have the content, but does provide a link to the full (even if unstructured) content, as LexML does, I think it would qualify.

As I mentioned before, I think the metadata returned by this query is very little, and might not be enough to qualify for the criteria established in the metodology:

Also, a proper RESTful webservice should also include a dereferenceable HTTP URI besides the URN. But that is beyond the point of the discussion here.

According to @tlacoyodefrijol, this is because the review process has not yet started, but should begin at some time in this month of January.

Hi @Wagner_Faria_de_Oliv and @herrmann, the submission interface is blocked, but we are in the review (“consulta pública”) period: please appreciate the suggestions to