Validating XML Schema for Large Schema Files

I am trying to use xmllint to test a schema that seems to use the libxml2 library.

The problem is that I have an unusually large schema file of about 10 MB. When I do this:

xmllint --schema j9.xsd --noout jsample.xml

I got the following errors:

j9.xsd:65535: element annotation: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}complexType': The content is not valid. Expected is (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)))).
j9.xsd:65535: element annotation: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}complexType': The content is not valid. Expected is (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)))).

..... It goes on and on. Apparently, the error line number should NOT be 65535 if there is an error. I am wondering if there is another library that does not have this restriction, or does anyone know how to fix this error. Thank!

+3
source share
1 answer

WONTFIX error for libxml2. https://bugzilla.gnome.org/show_bug.cgi?id=325533 . Unofficial patch attached to bugreport, have not tried it yet ...

+2
source

Source: https://habr.com/ru/post/1736162/


All Articles