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

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

From: Randall Leeds via GitHub <sysbot+gh@w3.org>
Date: Wed, 04 Nov 2015 01:04:25 +0000
To: public-annotation@w3.org
Message-ID: <issue_comment.created-153538422-1446599064-sysbot+gh@w3.org>
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

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