Xsd 大型模式文件的xml模式验证

Xsd 大型模式文件的xml模式验证,xsd,Xsd,我试图使用xmllint来验证模式,我相信它使用了下面的libxml2库 问题是我有一个非常大的模式文件,大约10MB。当我这样做时: xmllint --schema j9.xsd --noout jsample.xml 我得到了以下错误: j9.xsd:65535: element annotation: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}complexType': The content i

我试图使用xmllint来验证模式,我相信它使用了下面的libxml2库

问题是我有一个非常大的模式文件,大约10MB。当我这样做时:

xmllint --schema j9.xsd --noout jsample.xml
我得到了以下错误:

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?)))).
。。。。。
这种情况持续不断。显然,如果有错误,错误行号不应该是65535。我想知道是否有另一个库没有这个限制,或者是否有人知道如何修复这个bug。谢谢

libxml2的WONTFIX错误。bugreport附带了非官方的补丁,还没有尝试过…

Chaim提到的补丁对你有用吗?补丁可以。我不知道它们是为哪个版本编写的,所以我手动修补了libxml版本2.7.6,现在为错误行获取正确的行号。