Re: Rough Draft of Robust Anchoring: the RangeFinder API

On Wed, 2015-02-25 at 00:48 -0500, Doug Schepers wrote:
> Hi, folks–
> 
> Just a quick note. Rob asked me to move this file, to keep the 
> deliverables organized. It's now located at:
> 
>   http://w3c.github.io/web-annotation/api/rangefinder/

And now at https://specs.webplatform.org/rangefinder/w3c/master/

I promised Doug at least a couple of uses cases for the XPath 
selector. I can write them up in more detail if they're felt to be 
reasonable.

(1) consider a table such as a profit/loss statement in an annual 
report; let's annotate all cells in which the net revenue is negative.
The XPath expression might be something like
    //table[@id = 'profit-and-loss']//th[. = 'Net Revenue']/following-
sibling::td[. < 0]

(2) Find all students whose tutor is not listed:

  //li[@class = 'student']
      [
         [@class='tutor']
         [
            not(//li[@class='tutor']/@id = concat('#', @href))
         ]
      ]

These are both fairly complex examples in the spirit of "make the easy 
easy and the complex possible". Note that any identifier pointing at
actual text will not be possible with CSS selectors, although a 
combination of selectors and byte ranges within a containing element 
can be used. But there should also be a checksum and/or text 
comparison in case the wrong text is highlighted, of course.

Hope this helps. I have both simpler and more complex examples of 
course, if needed.

Liam


> 
> Even this is a temporary location, though... I'll be moving it to 
> specs.webplatform.org soon, and adding the annotation capability to 
> it.
> 
> Feel free to review, but be aware that the URL is transitory.
> 
> Regards–
> –Doug
> 
> On 2/24/15 1:33 PM, Doug Schepers wrote:
> > Hi, folks–
> > 
> > After talking about Robust Anchoring with many people over the 
> > course of the last couple years (!), with encouragement and good 
> > criticisms, I've refined my notion of what's needed for a client-
> > side API for Robust Anchoring.
> > 
> > I've drawn up a strawman of my current thinking for an API called 
> > RangeFinder [1].
> > 
> > It's very rough in places, but I'd appreciate any feedback on the 
> > spec as it stands. I'd greatly appreciate any thoughts or opinions 
> > on it at this stage.
> > 
> > I'm not sure it's mature enough for this yet, but at some point, 
> > I'd like to engage the research and academic communities and the 
> > experts who've published on text search algorithms, to polish this 
> > up and make it not quite as embarrassing as it is currently. If 
> > anyone knows who we should contact in that regard, please chime 
> > in. This is a great opportunity to leverage all that research in 
> > the service of Web developers and browsers!
> > 
> > [1] http://w3c.github.io/web-annotation/rangefinder-api/
> > 
> > Regards– –Doug
> > 
> 
> 

Received on Tuesday, 24 March 2015 23:36:51 UTC