cessda / cessda.cmv

Creative Commons Attribution 4.0 International
0 stars 0 forks source link

XSI prefix is not bound #126

Closed cessda-bitbucket-importer closed 3 years ago

cessda-bitbucket-importer commented 3 years ago

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.”

cessda-bitbucket-importer commented 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

cessda-bitbucket-importer commented 3 years ago

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 attribute as part of that process.

cessda-bitbucket-importer commented 3 years ago

Original comment by John Admin CESSDA Admin (JWT) (GitHub: john-shepherdson).


T-FSD2337 can be downloaded via the link

cessda-bitbucket-importer commented 3 years ago

Original comment by Alexander Mühlbauer.