Re: [xml] Structured error handler not getting called for validation errors



On Mon, Oct 25, 2004 at 11:41:37AM -0400, Daniel Veillard wrote:
On Mon, Oct 25, 2004 at 09:50:09AM -0400, Parag Chandra wrote:
The change I made is on line 454 of error.c:

    if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
        (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
      (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {

Prior to the change, this line simply did not include the "(domain ==
XML_FROM_VALID)" portion. I don't know if this was an oversight or if it
is by design.

If you add (domain == XML_FROM_VALID) in the test then you assume
the ctx pointer passed as an argument is an xmlParserCtxtPtr which
seems to be the case now but used not to be the case (an xmlValidCtxtPtr
was passed at some point IIRC).
So the change may make sense now, but could not be done before.
I changed it, thanks !

  I knew this would break ...
  http://bugzilla.gnome.org/show_bug.cgi?id=156903

I tried to design a solution working around the problem in CVS,

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]