Skip to content
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

Do properties use @vocab as base IRI or with with textual concatenation #173

Closed
lanthaler opened this issue Oct 22, 2012 · 1 comment
Closed

Comments

@lanthaler
Copy link
Member

The spec is currently ambigous as to whether @vocab is used as a base IRI or not. The syntax spec for instance states

@vocab: Used to set the base IRI for all property IRIs affected by the active context.

and

IRIs may be represented as an absolute IRI, a relative IRI, a term, a compact IRI, or as a value relative to @vocab.

whereas in API spec says (in IRI expansion)

  1. Otherwise, if the IRI being processed does not contain a colon and is a property, i.e., a key in a JSON object, or the value of @type and the active context has a @vocab mapping, join the mapped value to the suffix using textual concatenation

Expand-0028 illustrates the problem:

{
  "@context": {
    "@vocab": "http://example.org/vocab#",
    "date": { "@type": "dateTime" }
  },
  "@id": "example1",
  "@type": "test",
  "date": "2011-01-25T00:00:00Z",
  "embed": {
    "@id": "example2",
    "expandedDate": { "@value": "2012-08-01T00:00:00Z", "@type": "dateTime" }
  }
}

In this test date gets expanded to http://example.org/vocab#date, i.e., expansion uses textual concatenation. If @vocab would be used as base IRI instead, the result would be http://example.org/date.

PROPOSAL: Do not define @vocab as base IRI but as prefix.

@lanthaler
Copy link
Member Author

RESOLVED: Do not define @vocab as base IRI but as prefix.

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

1 participant