Re: [xml] RNG error messages?



I see! An interesting challenge--doesn't it involve backtracking to some degree, since RNG specifically allow ambiguity?

Is there anything one could work on to help make this better, or is it really all too deep magic to even contemplate?

On Apr 17, 2004, at 6:42 PM, Daniel Veillard wrote:

On Sat, Apr 17, 2004 at 05:39:25PM -0400, Chris Ryland wrote:
Daniel--

See session below--is this what you're talking about for not-ideal
error message?

Basically, if the attribute "break-after" of the <para> element doesn't
validate, xmllint gives a spurious error about "Element ufo has extra
content: p".
[...]
Untitled1.xml:6: element para: Relax-NG validity error : Invalid
attribute break-after for element para
Untitled1.xml:4: element p: Relax-NG validity error : Element ufo has
extra content: p
Untitled1.xml fails to validate

  yes, that kind of problems. Due to the model of Relax-NG in a choice
you may have different variant of <p> syntax, the fact that an attribute
doesn't validate doesn't mean the element content won't validate. So
libxml2 stores potential error messages but how long it stores them
or discard them is imperfect and it may not be the most significant error
which gets raised.

Daniel


--
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml



Cheers!
--Chris Ryland / Em Software, Inc. / www.emsoftware.com




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