Skip to content

Type scoped context upstream change #1846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
azaroth42 opened this issue May 17, 2019 · 4 comments
Closed

Type scoped context upstream change #1846

azaroth42 opened this issue May 17, 2019 · 4 comments

Comments

@azaroth42
Copy link
Member

A proposal from a different WG (Verifiable Credentials) has led the JSON-LD WG to conclude that type scoped contexts should NOT be inherited outside of the instance of the type.

The issue: w3c/json-ld-syntax#174

This means that our use of Type Scoping to import the Annotation context will NOT work in JSON-LD 1.1, as the effect would be limited only to the specific type, and not its child nodes.
It also means that our current pattern of importing the contexts via type scoping of Services doesn't work.

To make this work, we would need to do one of the following:

  1. Define all of the classes used in the Annotation Model in the IIIF context, and type-scope them in, plus 1.1 contexts for the Services.
  2. Use instead property-scoping, but this doesn't seem to work in the case of at least items on Range, where the referenced class can be either a Range from IIIF's context or a SpecificResource from the annotation context.
    2b. There is a shortcut suggestion to allow type scoped contexts to have a method to say that all properties of the instance should be treated as if they were property-scoped to the same context. This seems to be the right fix.
  3. Redefine a separate context in 1.1 for the Annotation model that works with this shallow definition of type scoping and use that context instead. This would be a better long term fix, but outside of IIIF's direct control.

Thankfully this is not a normative change due to contexts not being semantically versioned, but it is a potentially very big one.

@azaroth42
Copy link
Member Author

Editors agree: See if @w3c will publish a 1.1 context for the Web Annotation Data Model if one is written up and if yes, then write one up for review. If we need to publish before it's live on w3c, then we can temporarily host on iiif, and rewrite our context when it is available. This is the right long term approach

@azaroth42
Copy link
Member Author

azaroth42 commented Oct 15, 2019

This was resolved upstream, and now unblocks us here. There's now a way to have the scoped contexts propagate with an explicit declaration: https://www.w3.org/TR/json-ld11/#context-propagation

We need to update our v3 context documents to the latest patterns.

@azaroth42
Copy link
Member Author

azaroth42 commented Oct 31, 2019

Delaying on this until the playground is updated so that we can check that it works as expected. But as the contexts aren't normative or semantically versioned, this shouldn't delay 3.0 release

@azaroth42 azaroth42 removed this from the Image and Presentation 3.0 - RC3 milestone Nov 27, 2019
@azaroth42
Copy link
Member Author

Seems to work as expected in the playground:
https://tinyurl.com/yc2fv3p8

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants