Proposal: Evolution of the Locator model #195
Replies: 3 comments 7 replies
-
|
From my perspective as someone who is generating WebPubs with position list documents for thousands of publications, I appreciate the backwards compatibility so they continue to function in updated versions of the toolkits |
Beta Was this translation helpful? Give feedback.
-
How concretely would you benefit from the change? Locators are usually associated with a publication more or less represented as an RWPM and RWPM enforces the need for a href by resource.
I'm a bit concerned about properties not referring to a specific manifestation of a publication. An agnostic progression sounds great, but in practice it's a lie. Given a location from the user point of view, total progression and position are different for each manifestation. I feel like you're trying to design the best format to persist locations, is this correct?
I'm not aware of that. How would it present itself? |
Beta Was this translation helpful? Give feedback.
-
|
After further explanation I understand a bit better how you've got to this. I have two extra points about the scope though:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
The current
Locatormodel has several limitations that have become apparent in practice.typeis not usedThe
typeproperty was intended to describe the type of the resource pointed to byhref. In practice it provides no value: the reading system already knows the media type of every resource from the publication manifest, and nothing in the toolkit uses it to make decisions. It is noise that every locator creator must supply and every locator consumer must ignore.hrefis too constraininghrefis required, which makes it awkward to express locations in publications where there is no meaningful sub-resource to point at:In both cases callers today work around the constraint by supplying a dummy or self-referential HREF, which is misleading and fragile.
No support for multiple resources
A single
hrefcannot express a location that is simultaneously anchored to multiple resources. Two concrete use cases make this necessary:Prior art: OPDS Progression 1.0
The OPDS Progression 1.0 addresses several of these issues with a
referencesarray that can hold multiple resource URIs with their fragments:{ "progression": 0.0174920, "references": [ "#t=849.250", "chapter2.mp3#t=423.52", "chapter2.html#:~:text=It%20was%20expected" ] }Bare fragment references (no
href, as in the audio example above) handle resource-less publications. Thereferencesarray naturally extends to multiple resources.Proposed Evolution of
LocatorThis is directly inspired by the OPDS Progression.
The
LocatorObjecttitleprogressionpositionpagetimetextreferencesThe top-level properties are used for contextualization publication-wide, for example in the user interface, but may be used as a fallback for positioning when no suitable
ReferenceObject is found.For example, the
textproperty contains normalized text, ready for presentation in the user interface. But a reference using an optimized scroll-to-text fragment should be used for positioning.Note that
textdoes not havebeforeandafterlike before. Do we need them, in the context of contextualization? They are a bit ambiguous because the reading system that consume the locator don't control the amount of prefix and suffix around the quote.The
ReferenceObjectA Reference object can be represented as a literal String (e.g.
"chapter2.html#:~:text=It%20was%20expected") or a full object.hrefprogressionis setprogressionfragmentsThis is naturally open for extensions, for example CSS selectors which don't have an official fragment identifier.
Alternative 1: Only URI References
We could simplify and have only URIs in the references array (like in the OPDS Progression document). This is more compact and compatible with OPDS Progression, but has a couple of issues:
progressioncannot be represented with a fragment. We need to roll out a non-standard one, like#scroll=0.5284.Alternative 2: Publication-wide fragments
The OPDS Progression allows for publication-wide fragments, such as
#page=45or#t=23.6. We could do the same and remove the top-level propertiestimeandpage. However:position.Compatibility with the Legacy
LocatorObjectThe new and legacy representations are asymmetrically compatible.
hrefandmediaType. We should expose an API that performs this reconstruction, so callers that need to write back to a legacy store or synchronize with older clients have a solution.Beta Was this translation helpful? Give feedback.
All reactions