You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalid Request (use 'force' to force a non-conformant request): <?xml version="1.0" encoding="UTF-8"?><error xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" code="badArgument">Bad argument (identifier): Identifier not in OAI format, must match regexp ^[[:alpha:]][[:alnum:]\+\-\.]*:.+</error>
(stopped after 0 retries)
So, Catmandu hands me an error passed on from HTTP::OAI. This library has a force flag which allows one to skip the validate_request subroutine that validates the identifier.
It wasn't implemented in Catmandu::OAI so it's not possible to use this flag from the command line like this:
I'm going to file a PR with a proposed addition that makes this flag available. Of course, there are good design reasons to not implement this in the CLI of Catmandu.
The use case here is harvesters being confronted with OAI-PMH endpoints that are managed by third parties that don't comply to the strict specification nor have any intention to do so in the near future (i.e. due to strategic or operational circumstances that hamper a better implementation on short notice).
The text was updated successfully, but these errors were encountered:
@netsensei I've changed your pull request to a --strict option and have force by default and switching it off optionally. The intent of Catmandu is to be quite liberal what to accept as data
I'm confronted with an OAI-PMH endpoint that publishes records that don't have an OAI 2 compliant identifier:
$ catmandu convert OAI --url http://example.org/oai --metadataPrefix oai_dc --getRecord 1 --identifier "foobar:20000099"
Will return me this:
So, Catmandu hands me an error passed on from
HTTP::OAI
. This library has aforce
flag which allows one to skip thevalidate_request
subroutine that validates the identifier.It wasn't implemented in
Catmandu::OAI
so it's not possible to use this flag from the command line like this:$ catmandu convert OAI --url http://example.org/oai --metadataPrefix oai_dc --getRecord 1 --identifier "foobar:20000099" --force 1
I'm going to file a PR with a proposed addition that makes this flag available. Of course, there are good design reasons to not implement this in the CLI of Catmandu.
The use case here is harvesters being confronted with OAI-PMH endpoints that are managed by third parties that don't comply to the strict specification nor have any intention to do so in the near future (i.e. due to strategic or operational circumstances that hamper a better implementation on short notice).
The text was updated successfully, but these errors were encountered: