w3c / web-annotation

Web Annotation Working Group repository, see README for links to specs
https://w3c.github.io/web-annotation/
Other
141 stars 30 forks source link

Context in vocab appendix tries to redefine @id, @type #421

Open azaroth42 opened 7 years ago

azaroth42 commented 7 years ago

The context defined in Appendix A of the Vocabulary specification [1], in the following lines, attempts to redefine keywords. This redefinition is not actually possible, as the behavior of those keywords is normatively defined by the JSON-LD specification[2,3]. This was noted on the JSON-LD and Open Annotation Community Group lists [4]

These lines:

    "id":      {"@type": "@id", "@id": "@id"},
    "type":    {"@type": "@id", "@id": "@type"},

Should instead be:

    "id": "@id",
    "type": "@type",

As the context is not normative in its raw form, I propose that it be updated to avoid further confusion, and an erratum filed to correct the Appendix.

References:

  1. https://www.w3.org/TR/annotation-vocab/#json-ld-context
  2. https://www.w3.org/TR/json-ld/#node-objects
  3. https://www.w3.org/TR/json-ld/#aliasing-keywords
  4. https://lists.w3.org/Archives/Public/public-openannotation/2017Mar/0001.html
azaroth42 commented 7 years ago

Summary: Context document should use {"id": "@id"} and {"type": "@type"}

azaroth42 commented 7 years ago

Noted that the context document can and should be fixed before any future republication of the document.

BigBlueHat commented 7 years ago

Mostly as an FYI. @gkellogg recently committed some related stuff to the JSON-LD tests related to this issue: https://github.com/json-ld/json-ld.org/commit/9268a3dfad927c70ccb6f1917697d0ac9885d7a5 and a small follow-up tweak to the test files: https://github.com/json-ld/json-ld.org/commit/49ea2dadfde997bb9beef3a6673f7c866971d65d

Given that change, does this mean both these expressions are equivalent? Or is one preferred?