Re: Question on annotation of HTML content

> Am 06.11.2015 um 18:13 schrieb Ivan Herman <ivan@w3.org>:
> 
>> 
>> On 6 Nov 2015, at 17:48, Felix Sasaki <fsasaki@w3.org <mailto:fsasaki@w3.org>> wrote:
>> 
>> 
>>> Am 06.11.2015 um 17:32 schrieb Ivan Herman <ivan@w3.org <mailto:ivan@w3.org>>:
>>> 
>>> Hm. 
>>> 
>>> I believe that, in fact, what you wrote is almost correct as it is, provided that you have added an additional context for that namespace. Ie, in terms of JSON-LD, what you would do is:
>>> 
>>> {
>>>  "@context" :  [
>>>   "http://www.w3.org/ns/anno.jsonld <http://www.w3.org/ns/anno.jsonld>",
>>>   {
>>>    "itsrdf" : "http://www.w3.org/2005/11/its/rdf# <http://www.w3.org/2005/11/its/rdf#>"
>>>   }
>>>  ],
>>>  "target" : "A URI TO THE TARGET“,
>> 
>> 
>> How would the URI to the target look like, if we assume that the target is the string „Berlin“ in below HTML document?
> 
> There are several possibilities:
> 
> - you use an xpointer scheme URI using an XPATH selector
> 
> - you use a Text Quote Selector (http://www.w3.org/TR/annotation-model/#text-quote-selector <http://www.w3.org/TR/annotation-model/#text-quote-selector>)
> 
>  "target" : {
>   source: "URI TO YOUR HTML FILE",
>   "selector" : {
>    "@type" : "TextQuoteSelector"
>    "exact" : "Berlin"
>   }
>  }

That would create an ambiguity if the file contains
 <p>Welcome to <strong>Berlin</strong>! And I love Berlin!</p>

> 
> - We are also discussing to have an XPath selector or a CSS Media Query selector; both could also be used.

That would not work if we have 
 <p>Welcome to Berlin! And I love Berlin!</p>

The examples may sound artificial but I am coming as you may have guessed from the question how to represent annotations of strings that are part of HTML - and the rfc 5147 char scheme can’t be used for HTML content.

- Felix

> 
>> 
>>>         "body" : {
>>>   "itsrdf:translate" : "no"
>>>         }
>>> }
>>> 
>>> The trick is that JSON-LD allows multiple contexts to be mixed in. I believe that should be a bona fide (albeit unusual) annotation in the model, but maybe Rob will disagree.
>>> 
>>> However, if it actually *is* a correct annotation, we may want to call out this type of example somewhere in the document… Annotations may want to use terms from other vocabularies after all…
>> 
>> That would be nice. I took an action item to create such examples from the f2f meeting last week, so this is just a start and I’m trying to make sure this is going into the right direction - more to come next week :)
>> 
>> - Felix
>> 
>>> 
>>> Ivan
>>> 
>>> 
>>> 
>>>> On 6 Nov 2015, at 17:07, Felix Sasaki <fsasaki@w3.org <mailto:fsasaki@w3.org>> wrote:
>>>> 
>>>> 
>>>>> Am 06.11.2015 um 16:31 schrieb Ivan Herman <ivan@w3.org <mailto:ivan@w3.org>>:
>>>>> 
>>>>>> 
>>>>>> On 6 Nov 2015, at 15:35, Felix Sasaki <fsasaki@w3.org <mailto:fsasaki@w3.org>> wrote:
>>>>>> 
>>>>>> Hello all,
>>>>>> 
>>>>>> apologies for this newbie question. I am looking for an example of annotating HTML content. Imagine I have the following document:
>>>>>> 
>>>>>> <!DOCTYPE html>
>>>>>> <html lang="en">
>>>>>> <head>
>>>>>>   <meta charset="utf-8">
>>>>>>   <title>some html doc</title>
>>>>>> 
>>>>>> </head>
>>>>>> <body>
>>>>>>  <p>Welcome to <strong>Berlin</strong>!</p>
>>>>>> </body>
>>>>>> </html>
>>>>>> 
>>>>>> I want to create an annotation that uses the web annotation model, uses a text selector for the string „Berlin“ and adds an annotation body containing a triple with the „translate“ predicate from the ITS 2.0 ontology, see
>>>>>> http://www.essepuntato.it/lode/https://raw.githubusercontent.com/w3c/itsrdf/master/its-rdf.rdf#d4e52 <http://www.essepuntato.it/lode/https://raw.githubusercontent.com/w3c/itsrdf/master/its-rdf.rdf#d4e52>
>>>>>> expressing that the string should not be translated. How would this look like?
>>>>> 
>>>>> I am not sure what you intend to do. Do you mean that the target should be a graph containing a specific triple?
>>>> 
>>>> 
>>>> the target should be a selector selecting the string „Berlin“. The annotation body should contain a tripe like
>>>> 
>>>> "body": {
>>>>     
>>>> "itsrdf:translate" : "no",
>>>> 
>>>> … }
>>>> 
>>>> So I am wondering how to express this target and how the body should look like.
>>>> 
>>>> - Felix
>>>> 
>>>> 
>>>>> 
>>>>> Ivan
>>>>> 
>>>>> 
>>>>>> 
>>>>>> Thanks for the feedback in advance,
>>>>>> 
>>>>>> Felix
>>>>> 
>>>>> 
>>>>> ----
>>>>> Ivan Herman, W3C
>>>>> Digital Publishing Lead
>>>>> Home: http://www.w3.org/People/Ivan/ <http://www.w3.org/People/Ivan/>
>>>>> mobile: +31-641044153
>>>>> ORCID ID: http://orcid.org/0000-0003-0782-2704 <http://orcid.org/0000-0003-0782-2704>
>>> 
>>> 
>>> ----
>>> Ivan Herman, W3C 
>>> Digital Publishing Lead
>>> Home: http://www.w3.org/People/Ivan/ <http://www.w3.org/People/Ivan/>
>>> mobile: +31-641044153
>>> ORCID ID: http://orcid.org/0000-0003-0782-2704 <http://orcid.org/0000-0003-0782-2704>
>>> 
>>> 
>>> 
>>> 
>> 
> 
> 
> ----
> Ivan Herman, W3C 
> Digital Publishing Lead
> Home: http://www.w3.org/People/Ivan/ <http://www.w3.org/People/Ivan/>
> mobile: +31-641044153
> ORCID ID: http://orcid.org/0000-0003-0782-2704 <http://orcid.org/0000-0003-0782-2704>

Received on Friday, 6 November 2015 18:11:08 UTC