Skip to content
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

OAI-PMH harvesting error because of invalid XML output. #478

Open
nedbaldessin opened this issue Sep 21, 2022 · 0 comments
Open

OAI-PMH harvesting error because of invalid XML output. #478

nedbaldessin opened this issue Sep 21, 2022 · 0 comments

Comments

@nedbaldessin
Copy link
Member

nedbaldessin commented Sep 21, 2022

When harvesting the OAI-PMH repository, we get this error after a while :

<?xml version="1.0" encoding="UTF-8"?>
<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>2022-09-21T21:32:57Z</responseDate>
  <request>https://collection.mobiliernational.culture.gouv.fr/api/oai-pmh</request>
  <error code="badArgument">DOMDocument::createElementNS(): unterminated entity reference  GILBERT Achille</error>
</OAI-PMH>

To reproduce, use this validator:
https://validator.oaipmh.com/#ListRecords
And put the values in screenshot.

This is probably because the author name is PECQUEREAU Théodore & GILBERT Achille and the & character isn't properly escaped in the XML output.

Properly escaping the output should fix the problem.
OAI-PMH harvesting

erdnaxelaweb added a commit to Novactive/MN-gobelins-laravel that referenced this issue Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant