RE: Defining property labels in external context document

Markus, Niklas,

thanks for your quick and extensive answers and the quick change to the spec wording. The grammar document indeed helps to find out in detail what is valid/invalid in a @context document. I will take the time next week to understand and evaluate for our purposes the different options you provided for specifying and publishing custom property labels in the context (not necesarily context document) of JSON-LD.

Have a nice weekend,
Adrian

>>> On 19.7.2013 at 0:52, "Markus Lanthaler" <markus.lanthaler@gmx.net> wrote: 
> On Thursday, July 18, 2013 12:00 PM, Adrian Pohl wrote:
> [...]
>> users. See the first version of the context document at [2]. I asked on
>> twitter whether defining property labels in a context document is ok
>> and Markus responded that this would be invalid, see [3]. He suggested
>> putting the labels into the body of the external context file.
> 
> That just works if you are defining a vocabulary yourself. Otherwise you
> have to add that data in body of the instance document instead of the remote
> context.
> 
> 
>> Here is my question:
>> 
>> How should I define labels of properties in the body of a context
>> document? Just moving the text from context part to body as in [4] is
>> obviously wrong as the properties are then used as properties and not
>> as the things being talked about.
> 
> You would do it as with every other node:
> 
> {
>    "@context": "remoteContext.jsonld",
>    "@graph": [
>      {   
>        "@id": "http://rdvocab.info/Elements/otherTitleInformation",
>        "label": [
>           {
>              "@value": "Titelzusatz",
>              "@language": "de"
>           },
>           {
>              "@value": "other title information",
>              "@language": "en"
>           }
>        ]
>      }
>      ...
>   ]
> }
> 
> 
> 
>> Following from this question I am asking you to do some modifications
>> on paragraph 5.1 "The Context" of the JSON-LD 1.0 spec [5]:
>> 
>> - Please make it clearer what information is valid inside the @context
>> key and what is invalid.
> 
> Have you had a look at the grammar, specifically section B.7:
>   http://json-ld.org/spec/latest/json-ld/#context-definitions
> 
> Simply speaking, you shouldn't put any other data in a term definition. If
> you do so, it will be ignored by off-the-shelf JSON-LD processors.
> 
> 
>> - In the sentence "They also allow terms to be used for index maps and
>> to specify whether array values are to be interpreted as sets or
>> lists." the reference of "They" is unclear. It probably shall refer to
>> "expanded term definitions" which but this isn't clear at all as the
>> sentence before names "values" and "IRIs" which would rather be
>> considered to be referents of "They" in the following sentence.
> 
> Good catch. Fixed:
>  
> https://github.com/json-ld/json-ld.org/commit/569e633296ae846f712ebccc5cb438
> ed03289b8e
> 
> 
>> - Some sentences later it says: "External JSON-LD context documents may
>> contain extra information located outside of the @context key, such as
>> documentation about the terms declared in the document. " It would be
>> really helpful if you provided an example of an external context
>> document that contains extra information outside the @context key. It
>> may be clear to me that [4] is wrong but it is not clear to me how I
>> should do this instead...
> 
> The problem is that it looks exactly like a normal document with an embedded
> context. The difference only becomes apparent if the context is hosted at
> the same URL as the vocab. Here's an example how I use it.
> 
>  
> https://github.com/HydraCG/Specifications/blob/master/spec/latest/core/core.
> jsonld
> 
> If you dereference http://purl.org/hydra/core (and follow the redirect) you
> will get that document.
> 
> 
>> P.S.: Should I also send this to public-rdf-comments@w3.org?
> 
> Feel free to but I don't think it's necessary.
> 
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler

Received on Friday, 19 July 2013 10:09:58 UTC