w3c / wpub-ann

Web Annotation Extensions for Web Publications
https://w3c.github.io/wpub-ann/
Other
6 stars 10 forks source link

Use cases for side bias - are there any? #29

Open tcole3 opened 7 years ago

tcole3 commented 7 years ago

From Section 3.1.9 (Side-Bias) of EPub 3.1 CFI: "In some situations, it is important to preserve which side of a location a reference points to. For example, when resolving a location in a dynamically paginated environment, it would make a difference if a location is attached to the content before or after it (e.g., to determine whether to display the verso or recto side at a page break)."

No one has come forward with a use case justifying this feature. If no use case is available in a timely fashion (before the end of November 2017), the feature will be removed from FPWD. Can always be added back if a use case subsequently emerges.

This issue was split off from issue #9.

tkanai commented 7 years ago

I think one of the benefits is that it makes easy to implement "selection" function. It is not necessary to specify whether the "end" selector is inclusive or exclusive. Then, this simple method works for the case below.

<html>
<body>
<p>Hello World</p>
</body>
</html>

How do we select the word "World" only? With EPUB CFI, we can say it starts from the left side of the letter "W" and ends at the right side of "d". Easy!

I might be missing something, but could you tell me how to select the word "World" with RangeSelector?

danielweck commented 7 years ago

Spec. link: http://www.idpf.org/epub/linking/cfi/epub-cfi.html#sec-path-side-bias

danielweck commented 7 years ago

From the CFI spec.:

note: side bias is only meaningful when some type of break falls at the location (e.g., a page break or line break).

Personally, I am not aware of any existing CFI processor / handler that is side-bias-aware (apart from basic parsing of the ;s=a|b syntax). That's not to say that the use-case is invalid, but in the "real world" ; from my personal implementation experience ; I have not come across concrete usage of side bias.

mattgarrish commented 7 years ago

I admit to be confused as hell by side bias, beyond the general idea that it indicates which side of a break to start content with.

To @tkanai, that's not a use case for side bias, is it?

If it is only important where a break occurs, a break never occurs exactly at a character position, or is this intended to work on some pre-break calculation? It seems like the most that can happen is it occurs immediately before or after that character, or within a set of characters to which the specific character belongs, or immediately before or after that character string. I don't know how far out you have to look to determine this. But, in any case, the side bias would be for that character string. Or maybe the bias is for an ancestor element, although which one exactly is not clear.

In any case, I would vote that this is not a problem worth trying to solve for 1.0.

tkanai commented 7 years ago

@mattgarrish It was not the use case, that's for sure. I just thought how we could generalize the CFI feature and introduce it into Locator spec efficiently, and I'm on the same side with you and @danielweck.