RE: Relative IRI Resolution

On Wednesday, November 13, 2013 11:51 AM, Thomas Hoppe wrote:
> I have just wrapped my head around a very subtle detail of the spec
> regarding IRI resolution.
> Say I'd like to have a node like this:
> 
> {
>    "@context": {
>      "label": "http://www.w3.org/2000/01/rdf-schema#label"
>    },
>    "@id": "4711",
>    "label": "Just a simple document"
> }
> 
> Which has been retrieved from this URI:
> 
> http://api.example.com/docs/4711
> 
> Following the statements and definitions in sections "6.1 Base IRI" and
> "5.2 IRIs" one could think that the resulting IRI is:
> 
> http://api.example.com/docs/47114711

Why? That's not how relative IRI resolution works. JSON-LD works exactly the
same way as, e.g, HTML or CSS in this regard.


> Most people familiar with URL concepts know or instinctively feel that
> this is incorrect
> but from what I can see it is not defined in the spec.

It is defined in the API spec [1] (e.g. in [2] and [3]) which is where it
belongs because the processing is described there. The syntax spec just
defines the syntax.


Cheers,
Markus


[1] http://www.w3.org/TR/json-ld-api/
[2] http://www.w3.org/TR/json-ld-api/#context-processing-algorithm
[3] http://www.w3.org/TR/json-ld-api/#iri-expansion


--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 13 November 2013 11:08:45 UTC