Lex (URN)
is a URN namespace, a type of Uniform Resource Name, that allows accurate identification of laws and other legal norms.
LexML Brazil and Italy officially recognize the URN LEX standard draft. Brazil using LEX URNs since 2009, as a namespace for sources of law.
The
urn:lex was included in the official IANA list of "Formal URN Namespaces" in 2022, with, as required by the IANA process.Lex became finalized as informational RFC 9676 with the IETF in May 2025
Syntax
The URN syntax of the LEX identifier has a hierarchical structure as follows:where is the Namespace Specific String composed as follows:
where:
Illustrative examples of sources of law identified by URNs:
urn:lex:it:stato:legge:2003-09-21;456
urn:lex:fr:etat:lois:2004-12-06;321
urn:lex:es:estado:ley:2002-07-12;123
urn:lex:ch:glarus:regiere:erlass:2007-10-15;963
urn:lex:eu:council:directive:2010-03-09;2010-19-UE
urn:lex:us:federal.supreme.court:decision:1963-03-18;372.us.335
Concrete examples
Real URN LEX resolver at Brazil, the country where URN LEX was adopted since 2009, with the portal:- : Brazilian Constitution of 1988.
- : Law nº 11.705, of June 19, 2008, known also as "Brazilian Prohibition".
Transparent identifiers
URNs are used as unique identifiers, like using ISBN to identify books. The URN is also nominated as a "public ID". In that kind of public use, the need for a central authority las a unique and necessary URN-resolver is a problem. In that context, the identifier's user must query the authority about the correct ID from some object's metadata, like year or title. IDs like ISBN, which need a central authority, are also named "opaque IDs".A common use of Lex URNs is to express "transparent identifiers", which can be built up by simple rules or inferences from basic metadata. For example, the Brazilian Lex URN is used for both legislative and case law unique and universal identifier, using rules of formatting and abbreviation of the authority's name, the publication date, and the local identifier in the title of the document.
In computer science, an identifier is a data type. An opaque data type is a data type whose concrete data structure is not defined in an interface. In opposition, a data type whose representation is visible is called transparent.
URN schemes where each URN is also a transparent identifier can be used in distributed URN-resolution systems. The URNs can be created in the absence of these systems, even before recording in these systems.