Skip to content
Advertisement

Validation issues with polymorphic xml

We have some abstract elements defined in our root schema e.g.:

JavaScript

… which are then extended as follows:

JavaScript

These elements are used inside our xml file:

JavaScript

However, when I try to validate the xml using Saxon command line, I get the error message below:

JavaScript

Here is a link to the actual sample files for reference: xml / root schema – ext schema

Any help would be greatly appreciated 🙂

Advertisement

Answer

Your immediate problem can be solved by adding

JavaScript

to the xs:schema elements of your XSDs. For an in-depth explanation, see What does elementFormDefault do in XSD?

There remain additional validation issues. If their resolution is not obvious to you, post a new question, preferably with a complete MCVE that’s independent of off-site resources.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement