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

I guess I'm not surprised it broke something. You mention there is a
working solution in CVS. Do you mean that it fixes the problem described
in this post as well as the problem I was having related to catching
validity errors? 

-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: Sunday, October 31, 2004 12:19 PM
To: Parag Chandra
Cc: xml gnome org
Subject: 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
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 ...

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


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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