You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Ma...@VerizonWireless.com on 2005/05/23 16:37:04 UTC

RE: Failure to assign/relate an in-memory schema to an in-memory xml

Hmm, that's strange.
Let me know if you figure it out, then.

--Matt

-----Original Message-----
From: Gierschner, Frank [mailto:Frank.Gierschner@realtech.com]
Sent: Monday, May 23, 2005 2:44 AM
To: c-users@xerces.apache.org
Subject: RE: Failure to assign/relate an in-memory schema to an
in-memory xml


Hi Matthew.

Thanks for your guess but as you might see from my last posts I use the
DOMErrorHandler which should be suited as handler for the DOMBuilder as
parser. Nevertheless I tried your approach and additionally derived my
handler from ErrorHandler but none of the methods were called as I
suggested.

DOMErrorHandler has a method virtual bool handleError(const DOMError&
domError) which I overloaded and indeed gets called but the severity in the
case of using fgXercesValidationErrorAsFatal is always of kind Error.
Nevertheless DOMErrorHandler is capable of emitting fatals e.g. if I try to
parse xml-data contained in a XMLCh* which specifies an '...
encoding="UTF-8"'.

Kind regards.
 Frank

-----Original Message-----
From: Matthew.Hall1@VerizonWireless.com
[mailto:Matthew.Hall1@VerizonWireless.com]
Sent: Freitag, 20. Mai 2005 18:08
To: c-users@xerces.apache.org
Subject: RE: Failure to assign/relate an in-memory schema to an
in-memory xml


The custom handler you register with Xerces must be derived from
DefaultHandler and must contain these methods below in order to be sure you
are catching all possible XML errors. Otherwise the methods you do not
implement will just be sent to the default handler.

HTH!
Matt

// Overrides of the SAX ErrorHandler interface
void warning(const SAXParseException& e)
void error(const SAXParseException& e)
void fatalError(const SAXParseException& e)

-----Original Message-----
From: Gierschner, Frank [mailto:Frank.Gierschner@realtech.com]
Sent: Friday, May 20, 2005 8:08 AM
To: c-users@xerces.apache.org
Subject: RE: Failure to assign/relate an in-memory schema to an
in-memory xml

I have recognized that when additionally applying the feature
fgXercesValidationErrorAsFatal my DOMErrorHandler instance will NOT be
called for fatals but for errors when the xml is invalid against the schema.
Any idea?
___________________________________________________________________
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure.  If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof.  Thank you.