Notice! This page describes the nature of the error using a hypothetical example and not the erroneous data of the input test file. You should however be able to apply this information to your error case.

General description of the error:

The format of the error message: cvc-elt.1: Cannot find the declaration of element ''{0}''.

Error description in schema standard:

Possible causes for this error:

  • The validated file has a namespace which doesn't match the target namespace ("targetNamespace") defined in the schema.
  • Validated file does not have namespace ("xmlns") defined even though schema has "targetNamespace".
    • If schema has "targetNamespace="someNamespace"" then the validated file must match this with "xmlns="someNamespace"".
  • There might be extra spaces or minor typing mistakes in the xmlns="" attribute also.
  • Inserted XML does not match the schema used in the pipe


An example

<Document xmlns="urn:iso:std:iso:20022XXXXtech:xsd:pain.001.001.03"

Error messageError cvc-elt.1: Cannot find the declaration of element 'Document'.

How to fix: The element Document is not in the same namespace which is defined as a target namespace in the schema - i.e. the value given in default namespace attribute (xmlns) is incorrect. You have to check the schema to see what is the targetNamespace defined in there.

The schema definition could be e.g. following:

<xs:schema ... targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" ... >

Valid document tag could then look like this:

<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"