Re: A question about refinedBy/TextPositionSelector with RangeSelector

I agree and even thought we did relax this to allow just a single position,
but maybe I never followed up with that idea.

I think it's correct for the moment if you simply specify start and end as
the same value. Remember that the range selector describes a range, so the
position selectors don't need to describe a range in this usage but just a
point.

{
  "selector": {
    "type": "RangeSelector",
    "startSelector": {
      "type": "XPathSelector",
      "value": "/p[2]",
      "refinedBy": {
        "type": "TextPositionSelector",
        "start": 30,
        "end": 30
      }
    },
    "endSelector": {
      "type": "XPathSelector",
      "value": "/p[3]",
      "refinedBy": {
        "type": "TextPositionSelector",
        "start": 10,
        "end": 10
      }
    }
  }
}

It seems a little redundant but it's not wrong, I don't think.

On Fri, Jul 15, 2016, 04:36 KANZAKI Masahide <mkanzaki@gmail.com> wrote:

> Hello,
>
> I'm now trying to map Annotator.js object to Web Annotation, and find
> a bit difficult in using refinedBy/TextPositionSelector with
> RangeSelector.
>
> Now, consider we want to annotate a phrase from char 30 of paragraph 2
> to char 10 of the next paragraph. Annotator's rage object looks like
>
> {
>   "start": "/p[2]",
>   "startOffset": 30,
>   "end": "/p[3]",
>   "endOffset": 10
> }
>
> Then, straight mapping the above to Web Annotation target might be
> something like
> {
>   "selector": {
>     "type": "RangeSelector",
>     "startSelector": {
>       "type": "XPathSelector",
>       "value": "/p[2]",
>       "refinedBy": {
>         "type": "TextPositionSelector",
>         "start": 30
>       }
>     },
>     "endSelector": {
>       "type": "XPathSelector",
>       "value": "/p[3]",
>       "refinedBy": {
>         "type": "TextPositionSelector",
>         "end": 10
>       }
>     }
>   }
> }
>
> However, current Data Model requires (MUST) TextPositionSelector to
> have both "start" and "end". This is not very good fit for mapping
> from Annotator which does not have "endOffset" on stating point nor
> "startOffset" on ending point.
>
> Do you think this requirement could be relaxed in case of RangeSelector ?
>
> Thank you.
>
> --
> @prefix : <http://www.kanzaki.com/ns/sig#> . <> :from [:name
> "KANZAKI Masahide"; :nick "masaka"; :email "mkanzaki@gmail.com"].
>
>

Received on Friday, 15 July 2016 14:12:50 UTC