GNOME Bugzilla – Bug 159968
xmllint relaxng validation checks constraints before simplification
Last modified: 2017-06-12 19:06:37 UTC
try to validate a document against the attached grammar. xmllint reports a violation of relaxng's list//ref constraint [1]. However, contraints are to be checked after simplification (section 7 of [2]) and 4.19 in [relaxng] describes how refs are resolved during simplification. [1]: grammar.rng:17: element ref: Relax-NG parser error : Found forbidden pattern list//ref Relax-NG schema grammar.rng failed to compile [2] http://www.oasis-open.org/committees/relax-ng/spec.html
Created attachment 34324 [details] test grammar to reproduce bug
Okay, fixed in CVS. I also added the test to libxml2 regression suite, thanks ! Daniel
This should be closed by release of libxml2-2.6.21, thanks, Daniel
I can reproduce the problem with 2.6.27, with the attached test case. This bug is annoying when validating Open Document files against the OASIS relax schema.
Sorry can't reproduce, as I said it's part of libxml2 regression tests test/relaxng/list.rng and test/relaxng/list_0.xml paphio:~/XML -> xmllint --noout --relaxng test/relaxng/list.rng test/relaxng/list_0.xml test/relaxng/list_0.xml validates paphio:~/XML -> xmllint --version xmllint: using libxml version 20627-CVS2879 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug MemDebug RunDebug Zlib paphio:~/XML -> Check your shared library paths, if the problem still exist provide a fully reproduceable test case as a new bug, the one reported is fixed. Daniel
Ooops! "ldd xmllint" shows me that OpenOffice.org 2.0 provides an old copy of libxml2 that has the problem described in this bug report. Unfortunately, this version had precedence over my self-compiled version of libxml2. I fixed the library loading order, and now it works. Still, OOo should ship with a more recent copy of libxml2. I'm really sorry for the false alarm.
No problem, that was easy to fix :-) Daniel