Re: [xml] RNG error messages?



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/



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