gdcc/xoai

Fix the cursor position in the XOAI implementation of ResumptionTokenHelper

Closed this issue · 2 comments

Opening this issue to make a quick pull request.
The OAI spec says the cursor position should start with 0; the XOAI implementation starts with 1.
I.e., currently the resumption token under the 1st page of results looks like this:

<resumptionToken cursor="1">
   MToxMDB8Mjp8Mzp8NDp8NTpvYWlfZGM=
</resumptionToken>

It should instead say cursor="0" etc.

Dumb question, how come I can’t make a PR into gdcc/xoai? - https://github.com/gdcc/xoai/pull/new/30-resumptiontoken-cursor redirects me to DSpace/xoai and wants to open a PR there, into their main branch (with all the changes you’ve made since march, that is).
[edit: they may have modified the behavior there, so that it takes you to the base repo directly; and then you need to make some extra clicks to indicate you want to merge your branch into a lower fork. it should not have confused me as much as it did regardless]

I will close the issue. See the linked PR #31 for more info; in short, the original XOAI implementation of the cursor was wrong in more ways than this; by the spec, it was apparently supposed to count the number of items served - but the XOAI counts the pages served.
Will be properly implemented in a different PR that's already in the works.