-
Notifications
You must be signed in to change notification settings - Fork 56
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
Proposal: defining out-of-band order for lists #2323
Comments
@mielvds hi, any reason why the current |
Hi @DiegoPino! My bad, I've should have mentioned range. Our impression from https://iiif.io/api/presentation/3.0/#54-range was that it only dictates the order in the ToC/navigation, rather than fixing the actual order. But more importantly: it relies on the same list-typed Our use case is actually straightforward: have all newspaper pages displayed in the correct order without having the server sort them. The range examples we could find were about highlighting or grouping certain ranges in a book like https://iiif.io/api/cookbook/recipe/0024-book-4-toc/, but nothing about reordering pages. I probably missed something, and if so, this proposal can be easily dismissed as solved. in that case, though, I would suggest to make this part in the spec clearer and/or expand on the examples. Happy to contribute in that case! |
@mielvds my interpretation of the specs (re: the part I pasted underneath here): if a structure -> range with behavior sequence is present, the viewer should prefer that given order instead of the order of appearance of items. of course, if a viewer respect or not that is a different story. That would match your use case.
See even further in the specs
Not sure what you mean with
It does relay on the item |
Yep, it would!
What I mean it that as long as a Range also relies on the order of a Extending Range would be a good way to potentially implement this proposal, though. What you would need is the following:
Example manifest:
|
@mielvds as I said in slack, the computational effort of sorting an array you can produce already in this shape
Is truly minimal v/s changing a Community spec and then, if successful, deferring the sorting (someone needs to sort it anyways) back to the viewer instead (with the adoption/developer roadmap/times that it would entail). Not sure what programing language you are using for the final output, but it is really simple Something (roughly )like this ?
and then structures[0].items.yourlangueSortingFunction( TheCompareFunction ); ? If not I think you could maybe join one of the IIIF API editors calls and share your use case there, see how that goes. @glenrobson, what do you think? |
@DiegoPino thanks for following up on my question/proposal. Sure, you can order the array, but that's not what I'm after here. Adding sort operation is an extra (hackish) step in our architecture, which is exactly what I'm trying to avoid. What I'm proposing or asking is this: could we add (to the specification) a way for servers to push sorting items (e.g., Canvas) to the client in addition to the current server-only ordering. The motivation is enabling backend architectures that are for any reason not able to easily sort lists, such as a SPARQL-based stack. Yes, this is not IIIF's problem and mostly a major limitation in SPARQL. But if IIIF can be more inclusive with minor changes, it's worth discussing it. That said, if there is little support base within the community, we can drop it. |
This proposal is a follow-up from a discussion in #994. The order in which items are listed, but also presented by viewers, depends on the order of the JSON array. For example, pages of a book as a list of canvases in this manifest:
The items array is typed
@list
is JSON-LD, which in turn, is an rdf:List data structure in RDF. When interpreting the JSON-LD serialized IIIF manifest in RDF all is fine. Unfortunately, in reverse - going from RDF to a JSON-LD serialized IIIF manifest - this requirement is a bit of a burden.Creating a IIIF manifest from an RDF stack, which is what we (meemoo) happen to have, with SPARQL Construct + JSON-LD framing is actually quite elegant. But with one big caveat: creating an RDF list with SPARQL is extremely complex and cumbersome. Currently, we post-process our manifests and sort the arrays by code to make sure pages are presented in the right order, which is not ideal.
Granted of course, this is not an issue caused by the IIIF spec, but by the limitations of SPARQL. However, SPARQL is what it is and there might be other use cases unable to create ordered (RDF) lists directly (although I can't immediately think of any). Therefore, I'd like to discuss the possibility to add a complementary way of defining list order in the IIIF Presentation API 4.0 spec.
Proposal:
In short: add a way to define the order of list items outside of, but complementary to the existing array. If present, this definition of order would take preference over the array order. A rough example manifest (based on https://schema.org/ItemList) would look something like:
Similar constructs are also used by ore:Proxy
I understand that this puts an extra burden on viewers, but it might be minimal. Happy to hear your thoughts on this and whether this was already discussed or would be considered for the next version. Thanks!
The text was updated successfully, but these errors were encountered: