Problem with data in interleave in RELAX NG validation

Nikolai Weibull via xml <[email protected]> Sun, 09 Sep 2018 21:26:36 +0200
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
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
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml