Bugzilla – Bug 132722
libxml2 rng validation incorrectly handles 'start' overrides in 'include'
Last modified: 2008-08-19 08:20:29 UTC
The attached set of Relax NG schemas fails to compile in xmllint. Another validator, jing, has no such problem. (I test on a null document for simplicity). mvidner@valkyrie:bad2$ xmllint --noout --relaxng suse-primary.rng /dev/null suse-primary.rng:3: element include: Relax-NG parser error : xmlRelaxNG: include primary.rng has a start but not the included grammar suse-primary.rng:5: element ref: Relax-NG parser error : Some <start> element miss the combine attribute primary.rng:6: element ref: Relax-NG parser error : Found forbidden pattern start//interleave Relax-NG schema suse-primary.rng failed to compile /dev/null:1: parser error : Document is empty ^ /dev/null:1: parser error : Start tag expected, '<' not found ^ mvidner@valkyrie:bad2$ jing suse-primary.rng /dev/null /dev/null:1: fatal: Document root element is missing.
Created attachment 56693 [details] 132722-bad2.tgz Here are 3 rnc files and 3 rng equivalents generated by "trang suse-primary.rnc suse-primary.rng". Note that in the inclusion chain (suse-primary .. primary .. rpm-ns) the start element is overriden each time. If the override is commented out in suse-primary, libxml2 accepts the schema. (The override is actually useless here but not in the original files that were simplified for this testcase) From the error messages I infer that libxml2 wrongly applies the "combine" method, instead of replacing the definitions entirely as required when doing an include. (See 9.4 Replacing definitions in the RNC Tutorial, http://relaxng.org/compact-tutorial-20030326.html#id2815849)
Thanks for the report and the test case.
Reported upstream as http://bugzilla.gnome.org/show_bug.cgi?id=321068
Still the same with 2.6.23.
Pavol verified reported to upstream, that 2.6.27 was still affected.
Closing here. Tracked in upstream bugzilla.
I think tracking upstream does not count as "RESOLVED FIXED" ;)
Changed resolution to upstream and added URL