Open simontaurus opened 1 year ago
This follows RFC3987 resolution of IRI references, which does not have special provision for IRIs ending with #
. See the IRI Expansion Algorithm step 8.
Otherwise, if document relative is true set value to the result of resolving value against the base IRI from active context. Only the basic algorithm in section 5.2 of [RFC3986] is used; neither Syntax-Based Normalization nor Scheme-Based Normalization are performed. ...
Thank you for the clarification. So there is no way to use a vocabulary that uses #
as part of its IRIs as a @base
, e. g. to expand
{"type": "string"}
to
{"type": "http://www.w3.org/2001/XMLSchema#string"}
?
Certainly, you can use @vocab
for thins like @type
IRI expansion. @type
is special as it can expand either relative to the vocabulary or document base. Vocabulary expansion, also used for keys, uses string concatenation, rather than IRI resolution, for this purpose.
@base
is used to override the document location, for entities described within that document.
expands to
(playground) while
ignores the hash and falls back to the last slash
(playground)
Is this behaviour intended? I did not found any hint in the spec