Converts an IRI to a compact URI, if a declared namespace abbreviates it.
Turns IRIs such as http://www.w3.org/2000/01/rdf-schema#label into prefixed names such as rdfs:label, for compact
use in SPARQL, Turtle or JSON-LD text. If several declared namespaces abbreviate the IRI, the longest one is used. If
several prefixes declare that namespace, the first one in code point order is used, whatever the declaration order,
so the empty prefix always wins. An IRI has no compact form if it is in no declared namespace, or if the part after
the namespace is not a valid local name, as defined for Lexicon. Such IRIs must be written in full.
Converts an IRI to a compact URI, if a declared namespace abbreviates it.
Turns IRIs such as
http://www.w3.org/2000/01/rdf-schema#labelinto prefixed names such asrdfs:label, for compact use in SPARQL, Turtle or JSON-LD text. If several declared namespaces abbreviate the IRI, the longest one is used. If several prefixes declare that namespace, the first one in code point order is used, whatever the declaration order, so the empty prefix always wins. An IRI has no compact form if it is in no declared namespace, or if the part after the namespace is not a valid local name, as defined for Lexicon. Such IRIs must be written in full.