TextQuoteSelector and RangeSelector question

Hi all,

I'm attempting to contribute to the ScrollToTextFragment work going on at https://github.com/WICG/ScrollToTextFragment

That work is being crafted with a hope of compatibility with Web Annotation Data Model, but there's already been some early possible divergence.

Cribbing some lines from this section of the README...
https://github.com/WICG/ScrollToTextFragment#processing-model
"We'd like to reuse as much of the processing model...in the Web Annotation’s TextQuoteSelector as possible, potentially adding enhancements to that specification. Notably, we’d need to add the ability to specify text using a starting and ending snippet to TextQuoteSelector."

Here's what the ScrollToTextFragment "model" currently looks like:
```

targetText=[prefix-,]textStart[,textEnd][,-suffix]

            context  |-------match-----|  context

```

We don't quite have anything like that...sadly.

`TextQuoteSelector` currently requires `exact` and `prefix`/`suffix` are optional and `exact` must be the exact (surprise! ;-P) content selected (not the combination of a `textStart` and a `textEnd`).

We could almost use `RangeSelector`, but it trips itself up a bit by making the `endSelector` be exclusive rather than inclusive like the `startSelector` (or like `textEnd` above).

So, essentially, this ScrollToTextFragment selector looks like a new thing...

Perhaps we could add two new terms to `TextQuoteSelector` (perhaps `textStart` and `textEnd` as here) or (if we must) adding a new kind of Selector that supported this style.

We did have discussions within the Web Annotation WG around the risks of `exact` because it could potentially be too massive (certainly for URL use) and may also expose too much (copyrighted) content. Having a `textStart`/`textEnd` style selector would avoid that, so I think there's community benefit here beyond the ScrollToTextFragment compatibility alone.

Does that sound like a fair analysis? Or does anyone know of a different/better way to handle this style selector with the current kit?

Thanks, all!
Benjamin

[1] https://www.w3.org/TR/annotation-model/#text-quote-selector
[2] https://www.w3.org/TR/annotation-model/#range-selector


--

http://bigbluehat.com/

http://linkedin.com/in/benjaminyoung

Received on Tuesday, 13 August 2019 15:21:52 UTC