# IRIs

RDF.ex follows the RDF specs and supports IRIs (opens new window), an internationalized generalization of URIs, permitting a wider range of Unicode characters. They are represented with the RDF.IRI structure and can be constructed either with RDF.IRI.new/1 or RDF.IRI.new!/1, the latter of which additionally validates, that the given IRI is actually a valid absolute IRI or raises an exception otherwise.


The RDF module defines the alias functions RDF.iri/1 and RDF.iri!/1 delegating to the resp. new function:


Besides being a little shorter than RDF.IRI.new and better importable, their usage will automatically benefit from any future IRI creation optimizations and is therefore recommended over the original functions.

A literal IRI can also be written with the ~I sigil or the ~i which supports string interpolation:

import RDF.Sigils



But there's an even shorter notation for IRI literals.