W3C home > Mailing lists > Public > public-linked-json@w3.org > January 2015

Using multiple contexts

From: James M Snell <jasnell@gmail.com>
Date: Wed, 21 Jan 2015 05:41:50 -0800
Message-ID: <CABP7Rbfot5+3Ezx0iyjJ=OMJhJ7hktLYk-xRYqkRGicRYnPHDQ@mail.gmail.com>
To: Linked JSON <public-linked-json@w3.org>
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

  "@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.


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:43 UTC