Re: [web-annotation] Selecting more than text

On Tue, Nov 10, 2015 at 5:21 PM, Randall Leeds <randall@bleeds.info> wrote:

> .../p/node()[1] to ../p/node()[3] would select the first text node and the
> image.
>
> If you wanted to select only part of the first text node than you would
> need to further refine that.
>
> Since XPath to select the text would cause the evaluator to return a
> string rather than a node, I suggested on that GH issue that a full
> selector for each end of the range makes processing easier. A subSelector
> on the start could refine the start point to be inside the text node.
>

In which case, this is starting to make a lot of sense. :)

This would give us a way to further qualify both the beginning and end of a
selection--while grabbing everything in between.

Randall, do you have cycles to do some implementation exploration on the
current Range and XPathSelector things we've been tossing around?

It'd be great to do both an implementation and a JSON-LD structure
together. I'm happy to write along side, so that we can deliver these into
the model before the next F2F (in spring 2016) if not before.

Thanks for all the great input, Randall!
Benjamin


>
> On Tue, Nov 10, 2015 at 2:02 PM Benjamin Young <bigbluehat@hypothes.is>
> wrote:
>
>> But what if I want select `I <img src=""/>` from the example above?
>>
>> In this case, I'm inside a node but selecting more than text and the
>> expectation is that I'd be displaying the highlight "fully formed"--not as
>> code.
>>
>> This is the use case for the Kanji example above. Text and image (of
>> text) highlighted together.
>>
>

Received on Wednesday, 11 November 2015 13:23:49 UTC