A question about refinedBy/TextPositionSelector with RangeSelector

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 11:35:30 UTC