W3C home > Mailing lists > Public > public-linked-json@w3.org > October 2011

RE: Forms and principles of the JSOD-LD context

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Mon, 31 Oct 2011 21:34:53 +0800
To: "'Gregg Kellogg'" <gregg@kellogg-assoc.com>, 'Niklas Lindström' <lindstream@gmail.com>
Cc: <public-linked-json@w3.org>
Message-ID: <008601cc97d1$e2edb510$a8c91f30$@lanthaler@gmx.net>
> I actually added an example based on the telecom discussion in an issue
> [1]
> 
> {
>   "@context":
>   {
>     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
>     "xsd": "http://www.w3.org/2001/XMLSchema#",
>     "name": "http://xmlns.com/foaf/0.1/name",
>     "age":  {"@iri": "http://xmlns.com/foaf/0.1/age", "@coerce":
> "xsd:integer"},
>     "homepage": {"@iri": "http://xmlns.com/foaf/0.1/age", "@coerce":
> "@iri"},
>     "currentProject": {"@iri":
> "http://xmlns.com/foaf/0.1/currentProject", "@coerce": ["@iri",
> "@list"]},
>   },
>   ...
> }

How is that going to affect the processing? Currently prefixes are allowed
in coercion rules but not in the context itself. If we switch to this
condensed form we might run into some troubles at it opens the door for
nasty recursions.
Another thing, isn't @coerce in this case exactly the same as @datatype (or
@type if we merge them)? 


> > We could instead use a form where values can either be the IRI string
> > for the term, or an object defining both the @iri (or none to resolve
> > it to @vocab) and a @coerce rule. Like:
> >
> >    "@context": {
> >        "@vocab": "http://purl.org/dc/terms/",
> >        "created": {
> >            "@coerce": "dateTime"
> >        },
> >        "creator": {
> >            "@coerce": "@iri"
> >        },
> >        "identifier": {
> >            "@coerce": "string"
> >        },
> >        "issued": {
> >            "@coerce": "date"
> >        },
> >        "updated": {
> >            "@coerce": "dateTime"
> >        },
> >        "label": "http://www.w3.org/2000/01/rdf-schema#label",
> >        "Document": "http://xmlns.com/foaf/0.1/Document",
> >        "primaryTopic": {
> >            "@iri": "http://xmlns.com/foaf/0.1/primaryTopic",
> >            "@coerce": "@iri"
> >        }
> >    }
> 
> Other than the fact that "dateTime", "string", and "date" have no
> defined meanings, I see value in this. It can be inferred the if
> there's an @vocab, then prefixes without a defined IRI are considered
> to be within that vocabulary and IRI expansion takes place.

That's actually something that made me think that dropping @vocab (and
perhaps also @base) would be a quite good idea [ISSUE-26]. I think using
@vocab will result in a lot of messy/wrong data as terms will be used
regardless of whether they are in the vocabulary or not.


> Thanks for your thoughts. I can see some real advantages in
> consolidating this information, and it seems to follow given that we're
> already inclined to reverse the sense of @coerce relations.

+1


--
Markus Lanthaler
@markuslanthaler
Received on Monday, 31 October 2011 13:35:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:35 GMT