[jdom-interest] Adding a JDOMParseException to org.jdom.input
Jason Hunter
jhunter at servlets.com
Sat Apr 5 16:03:56 PST 2003
Elliotte Rusty Harold wrote:
>
> At 6:15 PM +0100 1/16/03, Laurent Bihanic wrote:
>
> >Use case: My main objective here was to be able to retrieve the envelope part
> >of a document made of a protocol envelope and an application body, the
> >envelope content being sufficient to return a protocol-compliant
> >fault response.
>
> Interesting. I hadn't thought of this before. I may borrow the idea
> for XOM. See discussion on xml-dev.
>
> However, there are also problems. For instance, if the
> well-formedness error is a missing end-tag, then the element with the
> missing end-tag will still appear in the partial tree. Is this OK?
I think it's mandatory for Laurent's use case. Considering the document
is handed to you from an Exception class and the method call to get it
is getPartialDocument(), the developer should well understand what
they're getting.
> And if the problem is a missing root element, then this may produce a
> Document object with no root element. We've generally tried to avoid
> this. Could this violate any of the usual assumptions of JDOM on
> which other code might depend?
We've conveniently already crossed that bridge (with an
IllegalStateException).
-jh-
More information about the jdom-interest
mailing list