XInclude exceptions - how to mirror Xerces J functionality into Xerces C++? 2007-02-04 - By Michael Glavassevich
Hi Simon,
Simon Rowland <srowlandx11@(protected)> wrote on 02/04/2007 11:47:50 AM:
> Thanks Michael, I really appreciate the reply. In the xerces c case, the
> standard DOMParser to which I am adding xi as a feature can either > report errors through the clients errorHandler, which takes a > DOMException, or throw XMLException, which the client is expected to catch. > > I'm currently favouring adding an XMLException, since extending > DOMException seems to go against its pretty tight spec: > http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-17189187 > Several other modules inside the DOMParser e.g. platform utils etc > extend the XMLException too, so it seems inkeeping.
I don't know enough about Xerces-C++ to say whether that's the right approach. If you were doing this in Java for JAXP (DocumentBuilder) or DOM Level 3 (LSParser) it would be pretty clear what to do.
DocumentBuilder [1]: Call fatalError() on the registered ErrorHandler and then throw a SAXParseException. LSParser [2]: Call handleError() on the registered DOMErrorHandler and then throw an LSException.
> I've asked on c-dev too. > > Thanks again for the help, Simon. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-dev-unsubscribe@(protected) > For additional commands, e-mail: j-dev-help@(protected)
[1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/parsers /DocumentBuilder.html [2] http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSParser.html
Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrglavas@(protected) E-mail: mrglavas@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscribe@(protected) For additional commands, e-mail: j-dev-help@(protected)
|
|