w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

Confusing statement on aliasing keywords #308

Closed hsolbrig closed 4 years ago

hsolbrig commented 4 years ago

The sentence "Other than for @type, properties of expanded term definitions where the term is a keyword result in an error. " (Section 4.1.6) is difficult to understand. Would it be possible to add an example of an "@type" and another keyword to clarify the intent?

gkellogg commented 4 years ago

There's a note in Aliasing Keywords: "Aliased keywords MUST NOT be used within a context, itself.", but it's not normative, and shouldn't use normative language.

There are a number of places in keyword definitions where we say --term-- MUST NOT be aliased, and we probably shouldn't make this statement. It's not that there's something special about a keyword (other than @context) that prevents it from being aliased, it's that nothing in a context definition can be aliased. The grammar and term definition sections should make this clear normatively. We should remove statements we've added about not aliasing keywords other than @context and clarify that keywords may be aliased in the body of a JSON-LD document exclusive of a context or term definition.

gkellogg commented 4 years ago

There is already a reference to #using-set-with-type which has such an example. I've updated the text to also say that there are examples there, in addition to further detail.

azaroth42 commented 4 years ago

Editorial work resolved by #312