Re: where to put json-ld context for LDP

Hi Gregg

> On July 29, 2014 at 2:08 AM Gregg Kellogg <gregg@greggkellogg.net> wrote:
> 
>  We could consider a boilerplate context, which would gather such common
> definitions together, then you could do something like the following:
> 
>  {
>    "@context": [
>      " http://www.w3.org/ns/rdfs",
>      {
>        "@vocab": " http://www.w3.org/ns/ldp#",
>        "ldp":  " http://www.w3.org/ns/ldp#",
>        ...
>      }
>    }
>  }
> 
>  And put all of the RDFS-related definitions in a single location.
> 

I understood duplicate context terms are overridden using a
most-recently-defined-wins mechanism.

So if I was using the above LDP example as an external context and the
referenced RDFS context was defined in a similar way.

Imagine there were some terms with 'the same' name, say rdfs:comment and
ldp:comment. If I used the term "comment" in my JSON-LD document, I assume this
would be expanded to "http://www.w3.org/ns/ldp#comment" as this is the most
recently defined.

Also if I wanted to use any RDFS term in my document, then i would HAVE to
prefix them with rdfs: otherwise they would be expanded again the @vocab from
LDP context.

Do I understand that correctly?

Reminds me of XML namespaces...

Cheers

John

Received on Tuesday, 29 July 2014 08:21:38 UTC