[OAI-implementers] dealing with non-existent Sets

Thomas G. Habing thabing@uiuc.edu
Mon, 21 May 2001 12:16:48 -0500


Hi Ben,

In general, if the OAI request is correct in every way except that your
repository does not have the item(s) being requested, either 'no such set',
'nothing in the given date range', 'no such record identifier', etc., the
correct response is to return a valid OAI response, but with no data.  For
example,

Request:

verb=ListIdentifiers&set=there:is:no:set

Response:

<?xml version="1.0" encoding="UTF-8"?>
<ListIdentifiers 
xmlns="http://www.openarchives.org/OAI/1.0/OAI_ListIdentifiers"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/1.0/OAI_ListIdentifiers   
http://www.openarchives.org/OAI/1.0/OAI_ListIdentifiers.xsd">

    <responseDate>2000-10-01T19:20:30-04:00</responseDate>
    <requestURL>http://an.oa.org/OAI-script?verb=ListIdentifiers
           &amp;setSpec=there:is:no:set</requestURL>

</ListIdentifiers>

Kind regards,
	Tom
-- 
Thomas G. Habing
Research Programmer, Digital Library Initiative
University of Illinois at Urbana-Champaign
052 Grainger Engineering Library, MC-274
thabing@uiuc.edu, (217) 244-7809


Ben Henley wrote:
> 
>         Stupid question:
> 
>         I'm not clear from the protocol specs how I'm supposed to handle
> non-existent Sets.
>         If a client makes a request with a set argument which is a well
> formed setSpec but doesn't exist in my repository, should I:
> 
>         (a) return a 400 Status-Code
>         (b) return an empty response element
> 
>         I think it's (b), but I'm not sure - if the Set doesn't exist,
> should I treat it as an illegal argument or just reply "No records match the
> request"?
> 
>         Thanks.
> 
> Ben Henley <mailto:ben@biomedcentral.com>
> Special Projects Editor
> BioMed Central
> http://www.biomedcentral.com
> 
> _______________________________________________
> OAI-implementers mailing list
> OAI-implementers@oaisrv.nsdl.cornell.edu
> http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers