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



Hi!

This remains unfixed. I have absolutely no idea what’s going on in the interleave validation code. Daniel, could you please put together some minor documentation on how the interleave validation code works? It’s very complicated.

Thank you,

 Nikolai

Nikolai Weibull, 2018-09-09 21:26:

Hi!

Given the following input RELAX NG grammar:

<grammar xmlns="http://relaxng.org/ns/structure/1.0";
        datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";>
 <start>
   <element name="a">
     <interleave>
       <attribute name="b"/>
       <data type="string"/>
     </interleave>
   </element>
 </start>
</grammar>

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.

 Nikolai



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