Hi,
I think I see where the problem is. You are setting the error
handler for the serializer, not the parser. Take a look at line 417. That
is where you should plug it it.
Gareth
On Wed, 5 Mar 2003 [EMAIL PROTECTED] wrote:
>
> Thanks for the response!
>
> Yes, I have done said binding in my code, but it is probably easier to deal
> with the DOMPrint example.
>
> // plug in user's own error handler
> DOMErrorHandler *myErrorHandler = new DOMPrintErrorHandler();
> theSerializer->setErrorHandler(myErrorHandler);
>
> Now, when I run that with personal-schema.xml (the included example),
> everything runs fine. However, if I change part of the file to be
> something that is well-formed, but not valid against the schema such as:
>
> <person2 id="Big.Boss" >
> <name><family>Boss</family> <given>Big</given></name>
> <email>[EMAIL PROTECTED]</email>
> <link subordinates="one.worker two.worker three.worker four.worker
> five.worker"/>
> </person2>
>
> The error goes through the DOMTreeErrorReporter::error function instead of
> the DOMErrorHandler *myErrorHandler = new DOMPrintErrorHandler();
>
> I thought these types of operational errors were supposed to go through the
> DOMErrorHandler. If they don't, then exactly what might I ever use the
> DOMErrorHandler for?
>
> Thanks!
>
>
>
>
> Gareth Reakes
>
> <[EMAIL PROTECTED] To: [EMAIL PROTECTED]
>
> oft.com> cc:
>
> Subject: Re: Question about
> DOMErrorHandler
> 03/05/2003 02:37
>
> AM
>
> Please respond to
>
> xerces-c-dev
>
>
>
>
>
>
>
>
>
> Hi,
> Are you binding your error handler with the parser? IN
> DOMPrint
> this is where it happens:
>
>
> DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();
> parser->setErrorHandler(errReporter);
>
> If you create you own you must tell the parser to use it. If this is not
> the problem then post a section of your code and well take a look.
>
> Gareth
>
> On Tue, 4 Mar 2003 [EMAIL PROTECTED] wrote:
>
> > I have not been able to get the DOMErrorHandler interface to return any
> > information. Even while using the DOMPrint example with the schema and
> > intentionally submitting non-valid code, the error is always returned
> > through the DOMTreeErrorReporter (ErrorHandler).
> >
> > I thought the DOMErrorHandler was supposed to get called to report errors
> > that happen while processing XML data. Is validating a document not such
> > an operation?
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> > Elliot Rapp
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> Gareth Reakes, Head of Product Development +44-1865-203192
> DecisionSoft Limited http://www.decisionsoft.com
> XML Development and Services
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]