Skip to content

Scope context by @type: mapped term or rdf uri? #521

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 Jul 12, 2017 · 1 comment
Closed

Scope context by @type: mapped term or rdf uri? #521

azaroth42 opened this issue Jul 12, 2017 · 1 comment

Comments

@azaroth42
Copy link
Contributor

In the description of scoped contexts by @type, it says:

Scoping can also be performed using a term used as a value of @type:

I believe that this is the term used for for the type's URI, not the type's URI directly? Thus if there were two separate terms, both mapped to the same type URI, they could each have different scoped mappings for the same terms and predicates.

For example:

{
  "AnnotationCollection": {
    "@id": "as:Collection",
    "@context": {
      "label": {
        "@id": "rdfs:label",
        "@container": ["@language", "@set"]
      }
    }
  },
  "Collection": {
    "@id": "as:Collection"
  },
  "label": "rdfs:label"
}  

This would allow the Collection to have label as a string, and AnnotationCollection to have label as a language map requiring an array of values for each language.

Correct? And if so, does this need clarification in the spec?

@gkellogg
Copy link
Member

It is the term having an @context in its term definition which is used as the value of @type which enables this behavior, it really isn't related to the URI the term expands to. You're correct in your interpretation.

We could perhaps make this more explicit in that sentence, but IMO, it's clear as is. However, the fact that you found it confusing should be enough to try for an improvement. Do you have an alternative wording you can suggest?

@gkellogg gkellogg added this to the JSON-LD 1.1 milestone Jul 12, 2017
gkellogg added a commit that referenced this issue Apr 12, 2018
…n it's expanded IRI, to find a scoped context.

Fixes #521.
gkellogg added a commit that referenced this issue Apr 12, 2018
…n it's expanded IRI, to find a scoped context.

Fixes #521.
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