Skip to content

[BUG] Inconsistent OAI-PMH results for empty sets #1428

@stweil

Description

@stweil

Description

For an empty set OAI-PMH ListIdentifiers should return the error noRecordsMatch.

It does so for metadataPrefix=oai_dc or metadataPrefix=epicur, but not for metadataPrefix=mets.

Examples

These two examples were produced with the latest release 5.0.7 (which produces much more empty lines than old releases).

Good result for https://example.com/oai/?verb=ListIdentifiers&metadataPrefix=oai_dc&set=newspapers:

<?xml version="1.0" encoding="utf-8"?>



        <?xml-stylesheet type="text/xsl" href="/typo3conf/ext/dlf/Resources/Public/Stylesheets/OaiPmh.xsl"?><!-- fixed -->
    
<OAI-PMH
    xmlns="http://www.openarchives.org/OAI/2.0/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
    <responseDate>2025-01-13T20:42:14Z</responseDate>
    
    
    <request verb="ListIdentifiers" metadataPrefix="oai_dc" set="newspapers">/oai</request>
    
            <error code="noRecordsMatch">
                Die Anfrage ergab eine leere Treffermenge.
            </error>
        
<!--
-->
</OAI-PMH>



















Bad result for https://example.com/oai/?verb=ListIdentifiers&metadataPrefix=mets&set=newspapers with release 5.0.7:

<?xml version="1.0" encoding="utf-8"?>



        <?xml-stylesheet type="text/xsl" href="/typo3conf/ext/dlf/Resources/Public/Stylesheets/OaiPmh.xsl"?><!-- fixed -->
    
<OAI-PMH
    xmlns="http://www.openarchives.org/OAI/2.0/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
    <responseDate>2025-01-13T20:40:20Z</responseDate>
    
    
    <request verb="ListIdentifiers" metadataPrefix="mets" set="newspapers">/oai</request>
    
            
    

        
<!--
-->
</OAI-PMH>



















Metadata

Metadata

Assignees

No one assigned

    Labels

    ☇ bugA non-security related bug.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions