[xml] Problem with data in interleave in RELAX NG validation


Given the following input RELAX NG grammar:

<grammar xmlns="http://relaxng.org/ns/structure/1.0";
   <element name="a">
       <attribute name="b"/>
       <data type="string"/>

and the following input document a.xml:

<a b="1">c</a>

xmllint reports:

a.xml:1: element a: Relax-NG validity error : Element a has extra content: text
a.xml fails to validate

Changing the interleave to a group solves the issue, so the problem is with how interleaves are validated.

I looked at xmlRelaxNGValidateInterleave() and I sadly have no idea what’s going on. Please point me in the right direction and I’ll gladly write a patch.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]