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

cvc-elt.1: Cannot find the declaration of element 'Document' #122

Open
PauloPhagula opened this issue Dec 17, 2024 · 0 comments
Open

cvc-elt.1: Cannot find the declaration of element 'Document' #122

PauloPhagula opened this issue Dec 17, 2024 · 0 comments

Comments

@PauloPhagula
Copy link

Hi,

I work for a company which been using the library to generate CreditTransfer SEPA files for some years now (so thanks 🙇🏾 a lot library ), but recently we hit a snag with an Italian bank, which fails to process the SEPA file with the error cvc-elt.1: Cannot find the declaration of element 'Document'.

The SEPA file in question does have the Document element, and validates against the XSD schema (pain.001.001.03.xsd) for it. But in searching for the error in the internet it seems to be a common error. In fact, I was able to see a similar error by simply opening the file with a VSCode while having installed the XML extension from Red Hat

Screenshot 2024-12-17 at 11 18 52

In trying to troubleshoot the issue I found this article https://knowledge.xmldation.com/support/validator/cvc-elt-1 which aludes to the fact that schemas might play a role. So removing the xsi:schemaLocation attribute from Document element seems to stop the error from showing, at least in VS Code.

Questions:

  1. Have you seen such an error and how did you fix it?
  2. I've looked at the sample SEPA files from Oracle, Goldman Sachs, and the php-sepa-xml library, and none of them specify the xsi:schemaLocation. So is this property really needed?
  3. The generated SEPA file and the sample file in this repo have a Document element whose schema location property reads: xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd". Should that space be there? Doesn't it contribute to an error during validation?

Thanks

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