Re: Multiple Contexts with expand/compact?

Hi Rob,

On Jul 11, 2014, at 4:42 PM, Robert Sanderson <azaroth42@gmail.com> wrote:
> 
> 
> Dear JSON-LD folk,
>   (and cc iiif-discuss)
> 
> We're trying to provide useful contexts, frames and sample code for working with the JSON-LD representations of our data in the IIIF community (http://iiif.io/).
> 
> One issue that we're struggling with is how to provide use contexts across multiple, related specifications.  
> There are two APIs in IIIF. One describes the structure of a set of images, and another describes how to interact with the individual images.  The intent is that the two can be implemented separately or together -- the structure could reference static images, and the image service might be stand alone without any structure overlaid.
> 
> From the structural description's JSON-LD, we import the context of the image description only at the block where it's needed.
> 
> A completely artificial example is at:
>     http://iiif.io/api/presentation/2.0/example/test_case.json
> 
> When the document is expanded, the @context in the embedded service block is processed, and the correct RDF representation is generated.
> However, the @context for the block is lost, so when it's later compacted, the remote fields don't get returned to the nice JSON keys they started out with.
> 
> Is there a solution for this, other than having a single context with all of the mappings in it?  This doesn't help for external contexts however, as we expect to make use of the GeoJSON-LD context and structure.  For more about our approach in this regard, see:  http://iiif.io/api/annex/services/

Sadly, no; at least not yet. I previously suggested that a frame might include an imbedded context, which would remain, and be used for compaction, in the output document. I think it's something which should be considered when the framing spec is completed, but it will be difficult, as the frame is expanded before processing.

I don't see how you would do this with anything other than a frame.

Gregg

> We have also been using framing, which runs into the same problem, as it expands the document in order to frame it.
> 
> A real example is:  
>     http://iiif.io/api/presentation/2.0/example/manifest1.json
> 
> Many thanks for any thoughts on the matter,
> 
> Rob Sanderson
> 
> -- 
> Rob Sanderson
> Technology Collaboration Facilitator
> Digital Library Systems and Services
> Stanford, CA 94305

Received on Saturday, 12 July 2014 15:35:39 UTC