[xml] relaxng error information

I have a recursive xml document structure which I am trying to validate
with relaxng.  I am having trouble with the error messages which
indicate an error in the outermost grammar start element, rather than
the innermost element of that same grammar, which is where the error
occurs.  Here's what I mean: given a document like this:


which has an error in the definition of element x:f; an error is
reported in the content of x:b.

My rng definition looks something like:

  <define name=a>
      <ref name=b/>
    <ref name=elems/>

  <define name=b/>

  <define elems>
      <choice of x:c, x:d, x:e, x:f, etc/>

  <define c>
    <definition of c with recursive reference to elems/>

  <!-- ditto for d, e, f, etc -->

I would really like the error to describe a problem in x:f but what I
get is: 
"element b: Relax-NG validity error : Element a has extra content: b"

Is this a bug or feature?  Are there any work-arounds?  I can provide
the actual files and an xmllint command if that will help.

This is on Debian lenny: libxml version 2.6.32.dfsg-5


Attachment: signature.asc
Description: This is a digitally signed message part

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