RE: Action-55 JSON-LD Context file etc.

On 16 Jul 2014 at 12:36, Phil Archer wrote:
> Thanks Markus,
> 
> I need to focus on other things this week but I hope to get back to it
> next week. And yes, all I did to create the draft DCAT context file was
> to copy and edit your work on HYDRA.
> 
> Basic Qs:
> 
> - should W3C create LD-context files for vocabs and serve them via
> conneg alongside Turtle, RDF/XML and HTML?

Yeah, I think that would be very valuable. A few already exist... For
example vCard in RDF [1, 2]


> - if so, do we include the mappings for all the terms (i.e. all the
> Dublin Core stuff in DCAT for example) or just the terms defined in that
> namespace?

I would say it depends on how often those terms will be used together and
how many of them there are. Please note that it is possible to reference
contexts from within a context so you can modularize it if you want. You
just need to take care that no terms collide.

 
> - if we should include the other namespace mappings then should that
> context file be somewhere other than the namespace?

I find it a good practice to create a JSON-LD file that acts both as a
representation of the vocabulary itself and as a context for that vocabulary
at the vocabulary's URL (e.g., http://www.w3.org/ns/hydra/core or
http://www.w3.org/2006/vcard/ns). Sometimes, if that file is "big" or if
there is a set of vocabularies that are often used together, I also suggest
to create a separate context which really just declares those term to IRI
mappings and nothing else. We did that for vCard:
http://www.w3.org/2006/vcard/context.jsonld is just 6kb instead of the 37kb
"vocabulary context".
 

> - and if you can show me how the heck to extend the context file to
> include all the language variations I'm very pleased that DCAT includes,
> that would be grand... ;-) (do I really have to define dataset_ar
> @language ar etc.?? looks horrible!)

I assume you are talking about the multilingual vocabulary definition here,
right? So, rdfs:labels in different languages... If that's the case, then
simply change

   "label": { "@id": "rdfs:label", "@language": "en" },

to

   "label": { "@id": "rdfs:label", "@container": "@language" },

This then allows you to express your vocabulary using language maps [3]:

    "@id": "http://www.w3.org/2006/vcard/ns",
    "@type": "owl:Ontology",
    "label": {
        "en": "Ontology for vCard",
    },

> 
> And we need the non-LD take on all this to prove that it's useful (I'm
> sure it is but we need evidence).

[1] http://www.w3.org/TR/vcard-rdf/
[2] http://www.w3.org/2006/vcard/ns 
[3] 

Received on Wednesday, 16 July 2014 13:21:44 UTC