Closed cessda-bitbucket-importer closed 3 years ago
Original comment by Alexander Mühlbauer.
@john-shepherdson Is it possible that you provide the file which you uploaded (T-FSD2337.xml) to reproduce the problem
Original comment by John Shepherdson (GitHub: john-shepherdson).
Before I do that, I will add that I removed the envelope by hand. It is possible that the issue does not arise in circumstances where e.g. the EQB Harvester removes the envelope, assuming it modifies the
Original comment by John Admin CESSDA Admin (JWT) (GitHub: john-shepherdson).
T-FSD2337 can be downloaded via the link
Original comment by Alexander Mühlbauer.
Original report on BitBucket by John Shepherdson (GitHub: john-shepherdson).
I've found the following issue with XML files from Kuha2 OAI-PMH endpoints (ADP, APIS, DNA, FSD, SASD):
Validation Gate: BASIC
Profile: CESSDA DATA CATALOGUE (CDC) DDI2.5 PROFILE 1.0.4
In every case I get the following error message:
Message: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "codeBook" is not bound.
<codeBook xmlns="ddi:codebook:2\\\_5" version="2.5" xsi:schemaLocation="ddi:codebook:2\\\_5\_ ?klzzwxh:0007?_">
I contacted the maintainer of Kuha2, to see if it might be an issue with that tool. His response was:
“The xsi-namespace must be defined in the OAI-PMH element, because the OAI-PMH element also uses xsi:schemaLocation attribute. The xsi-namespace is inherited to child elements so it is not necessary to redefine the same namespace again in the codeBook element.
The document won't validate against OAI-PMH & DDI 2.5. schemas if the xsi-namespace declaration is wrong. I assume that XML validation is performed before validating against CDC-profile. In other words, the DDI should be valid prior [to] checking if it conforms to the profile. I wonder why the profile then demands that the xsi-namespace declaration must be placed in codebook element.
I removed the OAI-PMH envelope from the Kuha2 output. Then I was able to validate the file.
This is the reason the xsi-namespace declaration must be included in the codebook document. The inclusion should be performed by the person or program that does the removing of the OAI-PMH envelope.”