GNOME Bugzilla – Bug 126093
RelaxNG validation fails without reporting error
Last modified: 2017-06-12 19:06:08 UTC
xmllint --noout --relaxng tutorA.rng demo.xml (files from libxml2's test/relaxng) only reports 'fails to validate' on these documents, without giving a reason. On the C level, xmlRelaxNGValidateDoc returns 1 (error) but no errors are passed to error handlers set by xmlRelaxNGSetValidErrors.
Sorry it took so long to get around to this bug, but I had it at a pretty low priority (since the validation error was discovered, just not well reported). I added an error message to cover this case (an element name doesn't match with the <choice>), and that should meet your expectation (fixed in CVS - relaxng.c): bill@billsuper relaxng $ xmllint --noout --relaxng tutorA.rng demo.xml demo.xml:1: element TEI.2: Relax-NG validity error : Did not expect element TEI.2 there demo.xml fails to validate Thanks for the report. Bill
This should be closed by release of libxml2-2.6.8, thanks, Daniel