What if there's a spine and no rel=next / rel=prev?
What if there are rel=next / rel=prev and no explicit spine?
What if there's both and they say the same thing?
What if there's both and they don't say the same thing?
What if rel=next points to a page who's rel=prev points somewhere else than back?
What if rel=next points to a page who's rel=prev points somewhere else than back?
What if there are multiple rel=next or rel=prev in a single page?
The "spine" has two related but distinct purposes:
deciding what to do when the user presses ( or clicks, or says...) next or previous.
deciding how to linearize the document when when rendering it non-interactively to a linear medium, such as print or speech.
Here's a proposed solution, based on the concept of trying to give useful semantics to existing constructs, without restricting authors any more than necessary.
For interactive use:
We can allow the "spine" to become more complex than an linear ordered list, and let it be a directed graph instead. Being in the <nav role=doc-toc> puts an document in the spine, with its predecessors and successors in <nav role=doc-toc> be its predecessors / successors in the conceptual spine, and the first item in <nav role=doc-toc> is the successor of index.html (and index.html is its predecessor).
Additionally, any rel=next gives a document additional successors, and any rel=prev gives a document additional predecessors. When navigating interactively, if a document has more than 1 successor/predecessor, the UA should ask the user which one to go to.
Pages that are linked to from the index.html (outside the <nav role=doc-toc>) or from any document in the e0 publication without using rel=next or rel=prev, are not part of the spine, cannot be reached by next/previous navigation and must be reached by clicking hyperlinks.
For non interactive use
If you're just trying to print the whole thing out, there's no opportunity to ask which "next" you want, so we need to pick by default. Also, a chain of rel=next is potentially infinite, so following it is not app
So we just follow the order established by <nav role=doc-toc> from index.html, and if there's none, there's nothing in the non-interactive linear order other than the index.html.
Simple version
If the proposal for the interactive version is overly complex, we can just give up on all that and use the same as the non interactive one always. This means giving up on rel=prev and rel=next, which isn't very satisfying, as they are preexisting HTML constructs with clear semantics. But their semantics allow complex structures, so if we want to allow them, we've got to deal with the complexity.
What if there's a spine and no rel=next / rel=prev? What if there are rel=next / rel=prev and no explicit spine? What if there's both and they say the same thing? What if there's both and they don't say the same thing? What if rel=next points to a page who's rel=prev points somewhere else than back? What if rel=next points to a page who's rel=prev points somewhere else than back? What if there are multiple rel=next or rel=prev in a single page?
The "spine" has two related but distinct purposes:
Here's a proposed solution, based on the concept of trying to give useful semantics to existing constructs, without restricting authors any more than necessary.
For interactive use:
We can allow the "spine" to become more complex than an linear ordered list, and let it be a directed graph instead. Being in the
<nav role=doc-toc>
puts an document in the spine, with its predecessors and successors in<nav role=doc-toc>
be its predecessors / successors in the conceptual spine, and the first item in<nav role=doc-toc>
is the successor of index.html (and index.html is its predecessor).Additionally, any
rel=next
gives a document additional successors, and anyrel=prev
gives a document additional predecessors. When navigating interactively, if a document has more than 1 successor/predecessor, the UA should ask the user which one to go to.Pages that are linked to from the index.html (outside the
<nav role=doc-toc>
) or from any document in the e0 publication without usingrel=next
orrel=prev
, are not part of the spine, cannot be reached by next/previous navigation and must be reached by clicking hyperlinks.For non interactive use
If you're just trying to print the whole thing out, there's no opportunity to ask which "next" you want, so we need to pick by default. Also, a chain of
rel=next
is potentially infinite, so following it is not appSo we just follow the order established by
<nav role=doc-toc>
from index.html, and if there's none, there's nothing in the non-interactive linear order other than the index.html.Simple version
If the proposal for the interactive version is overly complex, we can just give up on all that and use the same as the non interactive one always. This means giving up on
rel=prev
andrel=next
, which isn't very satisfying, as they are preexisting HTML constructs with clear semantics. But their semantics allow complex structures, so if we want to allow them, we've got to deal with the complexity.