W3C home > Mailing lists > Public > public-annotation@w3.org > August 2015

Re: JSON-LD Context

From: Robert Sanderson <azaroth42@gmail.com>
Date: Mon, 10 Aug 2015 09:35:50 -0700
Message-ID: <CABevsUH2jtoXj_L_V-sgmRk5raqiGSW0udU_0+5wD5RS=BQCVQ@mail.gmail.com>
To: Ivan Herman <ivan@w3.org>
Cc: Tim Cole <t-cole3@illinois.edu>, W3C Public Annotation List <public-annotation@w3.org>
Sorry, catching up after a vacation weekend (5th wedding anniversary).

After reading the docs and playing in the playground, I agree that @type:@id
should be @type:@vocab.   At some point in the past the playground must
have been buggy and treated both as per @vocab, as now I need to go and fix
a bunch of other contexts that were relying on @type:@id resolving a term
to a URI :(

Also agree we should not define a default @vocab. Other systems may rely on
relative URIs or otherwise set one.

The agreement previously was to remove namespaces, I believe wherever
possible.
E.g. as per: https://github.com/w3c/web-annotation/issues/12 and discussed
(IIRC) on one of the calls, if likely only briefly.  I think we should be
consistent ... either we require namespaces everywhere in values, or
nowhere.  I wouldn't want to do @type: "Annotation" and then motivation:
"oa:bookmarking" or vice versa.


My test case (similar to Tim's):

{
  "@context": {
    "oa": "http://www.w3.org/ns/oa#",
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",

    "type": {"@id":"rdf:type", "@type":"@vocab"},
    "Annotation": {"@type":"@id", "@id": "oa:Annotation"},

    "motivation": {"@id": "oa:motivatedBy", "@type": "@vocab"},
    "bookmarking": {"@type": "@id", "@id": "oa:bookmarking"}
  },

  "type": "Annotation",
  "motivation": "bookmarking"
}


Rob


On Mon, Aug 10, 2015 at 8:14 AM, Ivan Herman <ivan@w3.org> wrote:

>
> > On 10 Aug 2015, at 11:32 , Ivan Herman <ivan@w3.org> wrote:
> >
> >
> >>
> >> Actually… the idiom
> >>
> >> "url"  : { "@type" : "@id", "@id" : "@id"}
> >>
> >> also seemed to work on playground. If I then use:
> >>
> >> {
> >> "@context" : {
> >>   "type" : { "@type" : "@vocab", "@id":"rdf:type"},
> >>   "url"  : { "@type" : "@id", "@id" : "@id"}
> >> },
> >> "type" : "http://this.type.example.org",
> >> "url":"http://ww.example.org"
> >> }
> >>
> >> Ie, if the @context is included by URI
> >>
> >> {
> >> "@context" : "http://somewhere.org,
> >> "type" : "http://this.type.example.org",
> >> "url":"http://ww.example.org"
> >> }
> >>
> >> I get
> >>
> >> <http://ww.example.org> <rdf:type> <http://this.type.example.org> .
> >>
> >
> > I have asked a JSON-LD expert to see whether this is 'legal' JSON-LD
>
> Got the answer (from Gregg): yes, it is valid.
>
> Ivan
>
>
> >
> > Ivan
> >
> > ----
> > Ivan Herman, W3C
> > Digital Publishing Activity Lead
> > Home: http://www.w3.org/People/Ivan/
> > mobile: +31-641044153
> > ORCID ID: http://orcid.org/0000-0003-0782-2704
> >
> >
> >
> >
>
>
> ----
> Ivan Herman, W3C
> Digital Publishing Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> ORCID ID: http://orcid.org/0000-0003-0782-2704
>
>
>
>
>


-- 
Rob Sanderson
Information Standards Advocate
Digital Library Systems and Services
Stanford, CA 94305
Received on Monday, 10 August 2015 16:36:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:54:39 UTC