GNOME Bugzilla – Bug 727046
Wrong validation of XML documents containing nested interleaves.
Last modified: 2021-07-05 13:23:49 UTC
Tested against libxml2 version 2.9.1 in: * PHP 5.5 on Ubuntu 13.10, * Python with lxml on Ubuntu 13.10 and Cygwin. Validation of XML documents using Relax NG schema containing nested interleaves gives incorrect results (in some cases). Specifically using following test.rng schema all specified test.xml documents should be valid. But <root><type>type2</type><tag/><tagY/></root> is incorrectly marked as invalid. test.rng: <element name="root" xmlns="http://relaxng.org/ns/structure/1.0"> <interleave> <element name="tag"><empty/></element> <choice> <interleave> <element name="type"><value>type1</value></element> <element name="tagX"><empty/></element> </interleave> <interleave> <element name="type"><value>type2</value></element> <element name="tagY"><empty/></element> </interleave> </choice> </interleave> </element> test.xml: <root><tag/><tagX/><type>type1</type></root> => document is valid <root><tag/><tagY/><type>type2</type></root> => document is valid <root><tag/><type>type1</type><tagX/></root> => document is valid <root><tag/><type>type2</type><tagY/></root> => document is valid <root><tagX/><tag/><type>type1</type></root> => document is valid <root><tagX/><type>type1</type><tag/></root> => document is valid <root><tagY/><tag/><type>type2</type></root> => document is valid <root><tagY/><type>type2</type><tag/></root> => document is valid <root><type>type1</type><tag/><tagX/></root> => document is valid <root><type>type1</type><tagX/><tag/></root> => document is valid <root><type>type2</type><tag/><tagY/></root> => document is **NOT** valid <- BUG <root><type>type2</type><tagY/><tag/></root> => document is valid
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.