W3C home > Mailing lists > Public > public-annotation@w3.org > August 2015

Re: @context file

From: Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Date: Wed, 19 Aug 2015 13:45:07 +0100
Message-ID: <CAPRnXt=JG33gM8OZ8EJx4cr-m9sCHw5bASh=YTG+BQhj6kbJMA@mail.gmail.com>
To: Ivan Herman <ivan@w3.org>
Cc: Tim Cole <t-cole3@illinois.edu>, W3C Public Annotation List <public-annotation@w3.org>
thanks!

Redirect from https to http is not generally a good idea.. (the other
way is more helpful).  Many http libraries will dislike that security
drop (e.g. java.net.URL). It also means the w3.org context can't be
used directly from within https://-hosted web apps.



On 19 August 2015 at 12:52, Ivan Herman <ivan@w3.org> wrote:
>
>> On 19 Aug 2015, at 13:24 , Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk> wrote:
>>
>> This is part of JSON-LD Compaction - which I believe do not include
>> @type and @id aliasing - but serializers are of course free to use
>> "type" and "id" if they so please.
>>
>> http://www.w3.org/TR/json-ld-api/#compaction-algorithms
>>
>>
>>
>> Testing the new context in the JSON-LD Playground
>> http://json-ld.org/playground/#/gist/c6d082e9ded2ebc5bd4f
>>
>> I get out:
>> { "@context: { ...},
>>  "id": "http://example.com/ann1",
>>  "@type": "Annotation",
>>  "body": {
>>    "id": "http://example.com/body1"
>>  }
>>
>> So there "id" was mapped, but not "type"
>>
>> BTW - I was unable to use http://www.w3.org/ns/anno.jsonld directly as
>> @context as it does not provide CORS headers, you might want to fix
>> that.
>
> Sorry, I completely forgot. I have set it now.
>
>
>> Also there is no https equivalent?
>>
>
> Afaik, https works for the same file (there are some redirections set up in general, but I am not sure of the details)
>
> Ivan
>
>>
>>
>> On 16 August 2015 at 06:28, Ivan Herman <ivan@w3.org> wrote:
>>> Hi Tim,
>>>
>>>> On 16 Aug 2015, at 24:18 , Timothy Cole <t-cole3@illinois.edu> wrote:
>>>>
>>>> Ivan-
>>>>
>>>> As discussed the changes to @context mean that agents creating JSON-LD can use type instead of @type and id instead of @id -- which is good, but what about when annotations stored as RDF are to be disseminated in JSON-LD?
>>>>
>>>> I'm not clear from what I can discover from the JSON-LD Processing Algorithms and API document and from the test reports done for JSON-LD exactly how @context mappings are used when serializing RDF as JSON-LD (it does look that there is provision for applying @context, just not sure I understand all the rules, and when there is a choice -- as there would be for @type/type and @id/id, I would assume that the transforming agent has some discretion).
>>>
>>> I do not really know. I *think* that this is entirely the discretion of the conversion tool; I would expect good tools to be able to take a @context file and make a maximum use of it. But I would actually be surprised if this was standardized. Well, maybe the framing tool do that, but those are not standard.
>>>
>>>>
>>>> Is this another question for Greg, or do you or James know, or does someone else?
>>>
>>> Asking Gregg is definitely a good idea. He knows JSON-LD inside out, having also make a complete implementation around it (and having a great experience in RDF tools, too).
>>>
>>>>
>>>> Or maybe we have to provide libraries for this?
>>>>
>>>
>>> I do not think so.
>>>
>>>> Or maybe this is not an issue?
>>>
>>> Well… I do not think this is an active issue for us.
>>>
>>> @context is really there to simplify the JSON format of our data items. Where it *may* become an issue is if a fully RDF-based system has annotation data and wants to communicate/export the data with a pure JSON based annotations environment: they would have to export in the restricted JSON-LD format that we define. That may involve framing, etc, and that also means using @context. But that is mostly an implementation problem, not a specification one… (unless we want to define the details of framing in the standard, but I am not convinced we should do that). And I am not sure that scenario is a really realistic one, to be honest. Where I would expect LD to play a role is *consuming* existing annotation data into some LD environment (data integration with other types of data), where this problem does not occur, and not the other way round.
>>>
>>> My 2 cents…
>>>
>>> Cheers
>>>
>>> Ivan
>>>
>>>>
>>>> I ask not only as regards type and id, but because there is additional aliasing in @context we could consider to make the JSON-LD serialization seem more natural.
>>>>
>>>> By the way, I appreciate you fixing up the Wiki page examples. Thank you.
>>>>
>>>> -Tim Cole
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Ivan Herman [mailto:ivan@w3.org]
>>>> Sent: Wednesday, August 12, 2015 11:17 AM
>>>> To: W3C Public Annotation List <public-annotation@w3.org>
>>>> Subject: @context file
>>>>
>>>> I have made the changes we agreed upon on the @context file, both on the github repo and on /ns.
>>>>
>>>> Ivan
>>>>
>>>>
>>>> ----
>>>> Ivan Herman, W3C
>>>> Digital Publishing Activity Lead
>>>> Home: http://www.w3.org/People/Ivan/
>>>> mobile: +31-641044153
>>>> ORCID ID: http://orcid.org/0000-0003-0782-2704
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> ----
>>> Ivan Herman, W3C
>>> Digital Publishing Activity Lead
>>> Home: http://www.w3.org/People/Ivan/
>>> mobile: +31-641044153
>>> ORCID ID: http://orcid.org/0000-0003-0782-2704
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Stian Soiland-Reyes, eScience Lab
>> School of Computer Science
>> The University of Manchester
>> http://soiland-reyes.com/stian/work/    http://orcid.org/0000-0001-9842-9718
>>
>
>
> ----
> Ivan Herman, W3C
> Digital Publishing Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> ORCID ID: http://orcid.org/0000-0003-0782-2704
>
>
>
>



-- 
Stian Soiland-Reyes, eScience Lab
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/    http://orcid.org/0000-0001-9842-9718
Received on Wednesday, 19 August 2015 12:45:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:54:39 UTC