Re: use of @base

> On May 17, 2016, at 2:13 PM, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> 
> On May 16, 2016, at 17:57, Jim Balhoff <balhoff@gmail.com> wrote:
>> 
>> "Please note that the @base will be ignored if used in external contexts."
>> http://www.w3.org/TR/json-ld/#base-iri
> 
> Yes, that's correct, as it doesn't make sense for a single external context to resolve relative IRIs for every document using it.

Okay, that makes sense. Although the JSON-LD Playground does seem to resolve relative IRIs using an @base found in an external context.

> 
>> And an older version of that document says: "JSON-LD has no equivalent for the Turtle @base declaration”
>> http://www.w3.org/TR/2012/WD-json-ld-syntax-20120712/#prefix-definitions
>> 
>> Is the JSON-LD playground behavior in error?
> 
> No, your interpretation that a local context defining @base overrides a previous definition and the actual document load location.

I don’t think I understand. I thought the purpose of @base was to override the actual document load location?

> 
> Note, however, that properties and @type are "vocabulary relative", and may make use of @vocab, but this doesn't seem to be what you're running into.
> 
> You can also try my distiller at http://rdf.greggkellogg.net/distiller,as,a,different data point.

Thanks! Your distiller works as I expect. The @base in the local context is used, even if there is also an external context in use.

Best regards,
Jim

Received on Tuesday, 17 May 2016 19:12:53 UTC