w3c / publishingcg

Repository of the Publishing Community Group
https://www.w3.org/community/publishingcg/
Other
19 stars 8 forks source link

Locators, fragment identifiers, deep linking #6

Open jccr opened 3 years ago

jccr commented 3 years ago

I'd like to explore & document a not-very-complex but robust solution for referencing/addressing down to the content level.

Here's a deep link to a dpub of what I'm referencing: https://docs.google.com/presentation/d/11KjkTzyuOeDLlCiAccQYSJ5J-vNHJ_s2U3r4ws1FPLA/edit#slide=id.g81a3222d69_0_13 (very meta here: this link works by a script picking up the custom fragment and processing via JS)

I'll be thinking about well formed use cases (will update here on that), but in the meantime I'd like to set the stage up for discussion. Any use cases that you have in mind?

There's text fragments which we could discuss too: https://web.dev/text-fragments/

jccr commented 3 years ago

Prior engagement on this: https://www.w3.org/dpub/IG/wiki/Task_Forces/identifiers

WSchindler commented 3 years ago

I would agree that being able to link within a document, but also outside the bounds of it, is highly relevant. Of course, we have got ordinary hyperlinks to any web resoure and HTML fragment identifiers which presume an element with @id as target. But I think it would make sense to have a declarative way to point to a specific part of a resource (along the lines of EPUB CFI, but much less complicated). A use case would be to link a term in a document to an external dictionary entry where you would find either its definition or its translation in a target language. Or to be able to point to a specific word or clause to add an annotation. But we should have a closer look at W3C Web Annotations before we reinvent the wheel.

iherman commented 3 years ago

But we should have a closer look at W3C Web Annotations before we reinvent the wheel.

Yes.

The Web Annotation spec is, however, pretty complex, insofar as it defines many different things that are not necessarily relevant for this issue. The Working Group also published a note entitled “Selectors and States” that “extracted” the location mechanism from the official specification to make it more easily reachable (ie, this note does not specify any new selection mechanism). It may be better to look at that document for discussing the issue.

Note also that the Publishing (now Audiobooks) Working Group has published a separate note, based on the “Selectors and States” note, that added some publication specific features. These are much less mature (the note reflects an intermediate stage that, for various other reasons, was not pursued by the Working Group), and were defined for a specific technical environment (Web Publications), but may also represent some valuable technical points.