w3c / csvw

Documents produced by the CSV on the Web Working Group
Other
161 stars 57 forks source link

Is @context really an array property? #860

Open mgoodhand opened 6 years ago

mgoodhand commented 6 years ago

An apparent discrepancy in https://www.w3.org/TR/2015/REC-tabular-metadata-20151217 ...

§ 5.2 Top-Level Properties says

The top-level object of a metadata document or object referenced through an object property (whether it is a table group description, table description, schema, dialect description or transformation definition) must have a @context property. This is an array property, as defined in Section 8.7 of [JSON-LD]

'array property' is a link to § 5.1.1 Array Properties, which says

Array properties hold an array of one or more objects, which are usually description objects.

But @context doesn't fit this definition (array of objects). It is either a simple string (with fixed value 'http://www.w3.org/ns/csvw') or a heterogenous array of length 2, containing the string 'http://www.w3.org/ns/csvw' followed by an object.

I checked Section 8.7 of [JSON-LD] to see if it had an alternative definition of 'array property', but it seems to describe the local context, rather than the allowed content of @context as a whole.

I may be missing something, but @context seems special enough that it's not helpful to describe it as an array property.

Perhaps change

This is an array property, as defined in Section 8.7 of [JSON-LD].

to something like

This specification allows a restricted form of the @context defined in [JSON-LD].

gkellogg commented 6 years ago

I agree that it was a stretch to try to describe the local context as being an array property. We might need to tighten up your replace your suggested replacement, though.

iherman commented 6 years ago

Summary: Tighten up the text.

mgoodhand commented 6 years ago

Thanks.