W3C home > Mailing lists > Public > public-rdf-comments@w3.org > May 2013

Re: JSON-LD: Please keep @base

From: Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Date: Fri, 3 May 2013 09:51:50 +0100
Message-ID: <CAPRnXt=b11DV6Diyg2kCLV94B2METxfe-HrR_XB1=iUzuWh-0g@mail.gmail.com>
To: Markus Lanthaler <markus.lanthaler@gmx.net>
Cc: public-rdf-comments@w3.org, Linked JSON <public-linked-json@w3.org>
On 3 May 2013 09:39, Markus Lanthaler <markus.lanthaler@gmx.net> wrote:
>> Turtle allows the use of a relative base, as does HTML (AFAIKR), if
>> @base is seen in the context of an already established base IRI, this
>> could be valid, IMO.
> But neither Turtle nor HTML have external contexts. So are you really
> proposing to allow relative URLs in contexts?

After this discussion, I think it would only make sense to allow
relative IRI references (and @base) in contexts if they are scoped to
within that context. From a programming perspective it has to do with
scoping rules; and we have to kind of choose if we go for PHP-style or
Python style name scopes.

To me (with a Python background ;) ), this would feel more natural if
the scopes worked something like:

A context can have a @base
A context can have relative IRI references
The @base of a context can be relative (to the location of the context)

A context can only see names from the contexts it explicitly imports
(ie. it can't see names from the previous context)

@base is not inherited from an external context
Relative IRI references are resolved "locally" - ie within the external context
--> names imported from an external reference are always absolute

This would probably also be more familiar to the semantic web world.

But that would be a big jump from the current "Just keep evaluating in
a single namespace" mechanism; and probably require rewrite of most
parsers - it would also not allow these kind of tricks:

  "@context": [
    "id": "widget://c13c6f30-ce25-11e0-9572-0800200c9a66/"
    "proxy": "id:.ro/annotations/"
  "proxy": "bananas"

Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
Received on Friday, 3 May 2013 08:52:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:33 UTC