Re: [web-annotation] Functionality: XPath Range Selector

I grant that you can insist the selector be evaluated against 
normalized text Nodes. That's a good point.

But my understanding of XPath doesn't include any way to measure text 
offsets from Elements, only within Text Nodes, though I may be missing
 something.

The selector can be more robust against formatting changes by ignoring
 inline content. This requires measuring from some ancestor Element, a
 block element in this example. One might get more particular, 
measuring from the start of an article or main tag, or a p tag 
ancestor.

Making Range generic and letting XPath stand alone would mean that you
 could describe the boundaries as CSS or XPath and optionally offsets 
therefrom.

-- 
GitHub Notif of comment by tilgovi
See 
https://github.com/w3c/web-annotation/issues/95#issuecomment-153538422

Received on Wednesday, 4 November 2015 01:04:29 UTC