GNOME Bugzilla – Bug 492317
RelaxNG validation fails for a document that other RelaxNG validators deem valid
Last modified: 2021-07-05 13:25:22 UTC
Please describe the problem: I found a case where a document that both the "Jing" relaxng validator and the "relames" validator deem valid, is not validated by libxml2's RelaxNG validation. Included in this report are a minimal rng schema and a minimal document that exposes the problem. Steps to reproduce: schema.rng: <element name="root" xmlns="http://relaxng.org/ns/structure/1.0"> <choice> <element name="child"> <attribute name="type"> <value>Foo</value> </attribute> <!-- Define stuff that's only valid when type is "Foo" --> </element> <element name="child"> <attribute name="type"> <value>Bar</value> </attribute> <!-- Define stuff that's only valid when type is "Bar" --> </element> </choice> </element> document.xml: <root> <child type="Foo"> </child> </root> $ xmllint --relaxng schema.rng document.xml Actual results: xmllint output: <?xml version="1.0"?> <root> <child type="Foo"> </child> </root> document.xml:2: element child: Relax-NG validity error : Element child failed to validate attributes document.xml fails to validate Expected results: relames output: relmes verifier Copyright(C) Sun Microsystems, Inc. 2001 parsing schema.rng validating document.xml valid Does this happen every time? yes Other information: Although I did see other bug reports about incorrect validation behaviour, I think this is another individual case. I hope this report is helpful.
yes that's a valid new problem, damn, I will look, Daniel
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.