[xml] catalogs and xmlSetGenericError

I have just started using catalogs.  It seems to work great.

During testing, I noticed that error messages were being written to stdout.

I use the xmlSetGenericErrorFunc() function to send errors generated by the parser
to a different place, and that works great as well.

The question is:   Why weren't  the errors created when attempting to use
        the catalog code redirected by xmlSetGenericErrorFunc() as well.?

To be more precise my app receives an XML document and begins to parse it.
Somewhere in the process  xml loads my catalog file.   Validation
is turned on, and when the xml catalog code tries to map the publicId to a dtd it fails because I intentionally
messed up  the file name in the catalog file.  At this point it puts an error on STDOUT.
The error is correct and very clear, matching the defect that I intentionally introduced.


I desire the errors produced by the catalog code to be redirected just as the ones from the
parser get redirected.

Is this a reasonable desire and or assumption about how xmlSetGenericErrorFunc() should work?

Or does this require a different function to redirect the errors from the catalog code ?

Or perhaps the catalog code simply writes to stdout.

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