Using multiple contexts

One issue that I've run into a few times is the use of multiple contexts
that each assume they're the default and clobber each other. What usually
ends up happening is that each will specify a default @vocab or @base, and
will define sets of unprefixed terms mapped to their specific namespace.
This happens, for instance, when I use the schema.org jsonld context
together with the activity streams 2.0 context. The only way to address it
currently is to redefine a subset of schema that won't conflict with AS2.

A better solution would be to somehow support prefixed includes. For
instance...

{
  "@context": ["http://www.w3.org/ns/activitystreams#", { "s": { "@context"
: "http://schema.org"}}]
}

The effect of this would be to import the referenced context but associate
it's default vocab with the s: prefix.

Thoughts?

- James

Received on Wednesday, 21 January 2015 13:42:20 UTC