Wrong validation of XML documents containing nested interleaves.

Bug #1298655 reported by Richard Ostertág
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libxml2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.