RE: Context Questions

On Monday, February 03, 2014 9:36 PM, Robert Sanderson wrote:
> Dear all,
> 
> Apologies if I'm missing something in the spec but ...
> 
> 1.  Can a context document contain a list of further context
> documents? For example, to inherit a context from an external
> specification into a content document, one could define a context
> document (example.org/context.json) with the representation:
> 
> {
>   "@context" : [
>     "http://www.w3.org/2013/json-ld-context/rdfa11",
>     "http://www.openannotation.org/spec/core/context.json",
>     {
>       "local" : "http://example.org/",
>       "property" : {"@id" : "local:property"}
>     }
>   ]
> }
> 
> I don't see anything that this violates?  So we can chain contexts all
> the way down?

Yes, that works


> Processors will correctly barf on circular references,
> where context A includes context B, which includes context A?

Yep.
 

> 2.  If a document contains an @context definition AND the response has
> a context link header, which takes precedence? In other words, is the
> link header "seen" before the document's context, or vice versa?  Or
> is @context in the document ignored when the response is
> application/json ... and if so, is this a consistent rule?  Thus, any
> document that looks like JSON-LD but has the regular JSON media type
> MUST NOT be processed as JSON-LD?  If so, that's kinda harsh,
> especially in this early period where application/ld+json isn't widely
> known.  (eg section 6.8)

Link headers are ignored for application/ld+json responses and (at least
theoretically) @context should be ignored in all other documents. In
practice, however, I assume most implementations will use embedded
@context's. The processor starts with the one in the link header and then
adds the ones in the document.


> And merging the two questions, if the local context referred to in a
> link header references other context documents, then we should expect
> those definitions to be processed?

Sorry, I don't think I understand this question.


--
Markus Lanthaler
@markuslanthaler

Received on Monday, 3 February 2014 20:57:15 UTC