Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

OAI validation with openarchives.org

2009-03-19
2012-10-29
  • Hi,

    In order to get us through the validation checks at http://www.openarchives.org/Register/ValidateSite I had to hack the Fez files a bit:

    These were the errors:
    1. [FAIL] Datestamp in GetRecord response (2008-09-30 07:05:57) is not valid.
    -->I fixed this by hacking the oai.php in the root of Fez. My simple php function add the required "T" in the middle and the "Z" at the end.

    1. [FAIL] ListRecords response gave a noRecordsMatch error when it should have included at least the record with identifier oai:ir.iss.nl:iss:5. The from and until parameters of the request were set to the datestamp of this record (2008-09-30 07:05:57). The from and until parameters are inclusive, see protocol spec section 2.7.1. The message included in the error response was: 'No published items match (at least at your security level).'
      -->The oai.php uses the date of publication in stead of the timestamp to search and select. I fixed this by changing the file include/class.oai.php and replacing all occurrences of getID("Date") with getID("Created Date")

    2. [FAIL] No error code found in response. The request specified a date one year before the earliestDatestamp given in the Identify response. There should therefore not be any records with datestamps on or before this date and a noRecordsMatch error code should be returned.
      --> same problem as above

    3. [FAIL] Empty resumption token. There should never be an empty resumptionToken in response to a request without a resumptionToken argument
      --> I have edited the files ListRecords.tpl.html and ListIdentifiers.tpl.html in the directory templates/en/oai and removed the <resumptionToken></resumptionToken> like this:

    OLD:
    {if $list_count < 100}
    <resumptionToken></resumptionToken>
    {else}
    <resumptionToken>{$start+100}/{$resumptionHash}</resumptionToken>
    {/if}

    NEW:
    {if $list_count < 100}
    {else}
    <resumptionToken>{$start+100}/{$resumptionHash}</resumptionToken>
    {/if}

    Hope this helps someone else. I am using Fez version 2.0rc1 on Linux Opensuse 11.

     
    • Oh yes. I agree. Update Date is better.

      Thanks, Herman.

       
    • Christiaan
      Christiaan
      2009-03-20

      Hi Herman

      Thanks for your post and the fixes. I'll be merging these are some other OAI fixes (probaby overlapping) submitted by Bernadette Houghton from Deakin University to the Fez SVN trunk very shortly.

      Interestingly she used Update Date instead of Created Date in class.oai.php so any changes would go through too presumably. I'll stick with Updated Date for now i guess.

      Thanks again!

      Cheers,
      Christiaan Kortekaas