GNOME Bugzilla – Bug 142857
Bug in RELAX NG validation
Last modified: 2021-07-05 13:27:03 UTC
xmllint --relaxng netopeer.rng sample-config.xml Files are available at: http://merlot.ics.muni.cz/~novak/netopeer.rng http://merlot.ics.muni.cz/~novak/sample-config.xml xmllint returns a error: Relax-NG validity error : Extra element system in interleave sample-config.xml:34: element system: Relax-NG validity error : Element configuration failed to validate content Bud a James Clark's validator jing validates it ok and three developers check the netopeer.rng RELAX NG schema and it seems to be correct (and sample-config.xml too). So I suppose that this is a bug in libxml 2, if not I'm sorry.
Hum, could your try to trim the examples to show the problem on a reduced example ? There is a know RNG implementation problem in libxml2 when an interleave content includes an interleave, you might be hitting this. Also can you retry with 2.6.10 ? Daniel (on limited IP access)
I tried to reduce the schema and sample. It is at the same place. I tested it by libxml2 2.6.10: Relax-NG validity error : Extra element system in interleave sample-config.xml:17: element system: Relax-NG validity error : Element configuration failed to validate content sample-config.xml fails to validate On this particular XML document sample-config.xml, if I erase <logging-options> section, it works fine (bud there is no bug there).
I downloaded your files, and find that xmllint complains exactly as you describe. However, when I run 'jing' I get the following:- bill@billsuper bug142857 $ jing Jing version 20030619 usage: java com.thaiopensource.relaxng.util.Driver [-i] [-c] [-t] [-e encoding] RNGFile XMLFile... RELAX NG is a schema language for XML See http://relaxng.org/ for more information. bill@billsuper bug142857 $ jing netopeer.rng sample-config.xml /usr/projects/gnomecvs/bug142857/sample-config.xml:21: error: element "logging- options" from namespace "http://www.liberouter.org/ns/netopeer/1.1.5" not allowed in this context i.e. jing also claims your xml file is in error. Could you let me know whether you still believe xmllint is wrong? Regards, Bill
Ok, I uploaded the full version of the sample. Try it again please. I tested it by Jing version 20030619 and it validates it ok. If I tested libxml2 2.6.9/10 I get the follow error: Relax-NG validity error : Extra element system in interleave sample-config.xml:42: element system: Relax-NG validity error : Element configuration failed to validate content sample-config.xml fails to validate Output from jing: [novak@tokai 1.1]$ java -jar ~/jing/jing-20030619/bin/jing.jar netopeer.rng sample-config.xml [novak@tokai 1.1]$
I must move files netopeer.rng and sample-config.xml to the follow address: http://www.liberouter.org/~novak/netopeer.rng http://www.liberouter.org/~novak/sample-config.xml
petr, do you still face this issue nowadays or can this be closed as obsolete? if so, which version are you running?
Likely to still be an open issue, it's a problem which can arise when using interleave in interleave construct, it's a know very hard to fix bug. It still shows up in my test Daniel
It might make sense to add these two test files as attachments -- they are gone from both addresses now.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.