RDF.ex v0.2.0 RDF.URI.Helper View Source

Some helpers functions for working with URIs.

These functions should be part of a dedicated RDF.IRI implementation.

Link to this section Summary

Functions

Resolves a relative IRI against a base IRI

Checks if the given value is an absolute IRI

Link to this section Functions

Link to this function absolute_iri(value, base_iri) View Source

Resolves a relative IRI against a base IRI.

as specified in section 5.1 Establishing a Base URI of RFC3986. Only the basic algorithm in section 5.2 of RFC3986 is used; neither Syntax-Based Normalization nor Scheme-Based Normalization are performed.

Characters additionally allowed in IRI references are treated in the same way that unreserved characters are treated in URI references, per section 6.5 of RFC3987

Checks if the given value is an absolute IRI.

An absolute IRI is defined in RFC3987 containing a scheme along with a path and optional query and fragment segments.

see https://www.w3.org/TR/json-ld-api/#dfn-absolute-iri