- From: Thomas Hoppe <thomas.hoppe@n-fuse.de>
- Date: Wed, 13 Nov 2013 12:58:44 +0100
- To: public-linked-json@w3.org
On 11/13/2013 12:08 PM, Markus Lanthaler wrote: > 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. Well look at the example "Example 7: IRIs can be relative" given in section 5.2. which uses "../" as @id one could deduce that if there are no slashes in the @id that they are just concatenated. However, if it is defined in the API as you state below I'm happy :) > >> 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:59:16 UTC