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

Re: [web-annotation] Selecting more than text

From: Randall Leeds <randall@bleeds.info>
Date: Tue, 10 Nov 2015 22:21:14 +0000
Message-ID: <CAAL6JQjutmcG8jJrjvNWZCfHPfk-jtvk=M-TpVisViLinf-kLw@mail.gmail.com>
To: Benjamin Young <bigbluehat@hypothes.is>
Cc: W3C Public Annotation List <public-annotation@w3.org>, Ivan Herman via GitHub <sysbot+gh@w3.org>
.../p/node()[1] to ../p/node()[3] would select the first text node and the

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.

On Tue, Nov 10, 2015 at 2:02 PM Benjamin Young <bigbluehat@hypothes.is>

> 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 Tuesday, 10 November 2015 22:21:54 UTC

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