xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Adam Constabaris <adamc AT unc.edu>
- To: "'xom-interest'" <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Non NCName IDs
- Date: Mon, 20 Mar 2006 11:52:41 -0500
John Cowan wrote:
Elliotte Harold scripsit:
Yes, this sort of non-fatal error is an especial pain for XOM because
it has no non-fatal errors. The only thing it does to report an error
is throw an exception. There's no ErrorHandler as in SAX, nor does
XOM have any other means of talking to the end user.
If xml:id errors were marked "fatal", then *every* implementation would
have to treat them as fatal. However, there is nothing stopping XOM from
(a) treating the errors as fatal in every case, or (b) providing a switch
the user can set to "Ignore xml:id errors" or "Treat xml:id errors as
fatal", or (c) providing a hook such that elements with xml:id errors
are passed to the hook, or ....
I think I'm with John on this, and I came across a similar sort of issue recently in relation to a library that throws exceptions even if it can successfully (for some relevant definition of that term) produce output.
There's already an example of the kind of behavior described here in XOM, in the ValidityException.getDocument() method, which strikes me as a reasonable compromise: failure to validate is an exception condition, but there could still be a well-formed document that could be processed.
It's pretty important here in the ValidityException case that you have to turn on validation explicitly in your parser to get the exception, though. The analogy, I believe, would be to add a "setStrictXMLIDCheck()" (or whatever) option in Builder.
-
Re: [XOM-interest] Non NCName IDs
, (continued)
-
Message not available
-
Re: [XOM-interest] Non NCName IDs,
Daniel Veillard, 03/20/2006
-
Re: [XOM-interest] Non NCName IDs,
Elliotte Harold, 03/20/2006
- Re: [XOM-interest] Non NCName IDs, Daniel Veillard, 03/20/2006
-
Re: [XOM-interest] Non NCName IDs,
Richard Tobin, 03/21/2006
-
Re: [XOM-interest] Non NCName IDs,
Daniel Veillard, 03/21/2006
- Re: [XOM-interest] Non NCName IDs, Ed Davies, 03/22/2006
- Re: [XOM-interest] Non NCName IDs, Tatu Saloranta, 03/22/2006
-
Re: [XOM-interest] Non NCName IDs,
Daniel Veillard, 03/21/2006
- Re: [XOM-interest] Non NCName IDs, Richard Tobin, 03/22/2006
-
Re: [XOM-interest] Non NCName IDs,
Elliotte Harold, 03/20/2006
-
Re: [XOM-interest] Non NCName IDs,
Daniel Veillard, 03/20/2006
-
Message not available
-
Re: [XOM-interest] Non NCName IDs,
John Cowan, 03/20/2006
- Re: [XOM-interest] Non NCName IDs, Adam Constabaris, 03/20/2006
Archive powered by MHonArc 2.6.24.