Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Navigation response can return more than one level of the citation tree #226

Closed
geoffroy-noel-ddh opened this issue Oct 8, 2022 · 2 comments · Fixed by #238
Closed
Labels
Bostock2024 Navigation Endpoint Issues that deal with the Navigation Endpoint

Comments

@geoffroy-noel-ddh
Copy link

Am I correct in thinking that the Navigation API can only return a section of the tree at one single unique level at a time? That is, it cannot return any arbitrary subtree?

Say, if I want the complete 'table of content' of a book, with chapters and their sections, do I have to make at least two calls per document? In the trivial case where the identifiers use a dotted notation (e.g. 1.2), this may not be needed, as level 2 will expose level 1. Unless a chapter has no section. But in other cases (eg. level 2 identifiers based on sub-heading, rather than numeric system) it seems there is no single request that can return all available members of the tree.

In the worst case, a client trying to piece together the entire tree of a document may require two requests per level-1 passage (one for level 1, then one for its children), since the level-2 members don't declare their parents in the tree (unless I overlooked that feature?).

If my interpretation is correct, and there is interest in supporting arbitrary subtree requests in view of providing a table of content in a client user interface with a minimum amount of API requests, maybe the following ideas might be useful:

  1. a new, optional, 'depth=D' parameter in the Navigation query, which would essentially work like 'down' but also impose that the response contains D levels going up (e.g.. ref=9&depth=2 would return level 3 and also level 2)
  2. possibly add a specific way in the spec for members in the Navigation response to declare the identifier of their parent in the citation tree (so that relationship doesn't have to be interpreted from notational conventions in the identification system of the document units)
  3. possibly add a specific way in the spec for members in the Navigation response to contain a title or label (e.g. a chapter heading)

Apologies if those features are already supported and I missed them.

@PonteIneptique PonteIneptique added the Navigation Endpoint Issues that deal with the Navigation Endpoint label Oct 13, 2022
@monotasker monotasker added this to Proposed in 2024 RC Workshop Durham Feb 7, 2024
@monotasker monotasker moved this from Proposed to Accepted in 2024 RC Workshop Durham Feb 7, 2024
@PonteIneptique PonteIneptique moved this from Accepted to Implemented in 2024 RC Workshop Durham Feb 8, 2024
@PonteIneptique
Copy link
Member

Edit as the previous message replied to the wrong issue.

During the RC Workshop in Durham, it was decided to that ?down was a tree traversal operation. As such, ?down=2, from the root, would retrieve level 1 and level 2 element in the CitationTree.

?down=-1 allows for retrieving the whole tree or sub-tree of a Resource.

This enables Table of Content proxies.

See #228 for its implementation details and its apparition in the specs.

@monotasker
Copy link
Collaborator

We published the resolution of this issue during the tech committee meeting on 2024-03-08
commit a0db8ca
release https://github.com/distributed-text-services/specifications/releases/tag/1-alpha1

This is an alpha release and we are looking for feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bostock2024 Navigation Endpoint Issues that deal with the Navigation Endpoint
Projects
Development

Successfully merging a pull request may close this issue.

4 participants