nikku / node-xsd-schema-validator

A schema (XSD) validator for NodeJS
https://www.npmjs.com/package/xsd-schema-validator
MIT License
51 stars 24 forks source link

Support for <xi:include> needed #10

Closed CaptainPalapa closed 6 years ago

CaptainPalapa commented 7 years ago

If XSD requires:

<bob>
   <fred>x</fred>
</bob>

And XML has:

<bob>
   <xi:include href="./people/fred.xml" parse="xml"/>
</bob>

Error is thrown: [error] cvc-complex-type.2.4.a: Invalid content was found starting with element 'xi:include'. One of '{"http://domaincom":fred}' is expected.

Support for xi:include is super important for larger XML/XSD collections. (Note, Altova XML spy correctly processes the includes and validates, if you need a non-code-based check.)

nikku commented 7 years ago

We accept pull requests on this feature.