[jdom-interest] detach() [eg]

James Duncan Davidson duncan at x180.net
Tue Apr 24 16:54:39 PDT 2001

> Almost no one would ever see the ISE.  Only if you detached a root and
> then later actually cared about the doc.  I find that unlikely.  I'm
> sure people could write in many use cases for detaching the root, but
> none of them would care about the document afterward.  It's throw-away.
> So we let the root leave the document, and we put up a warning flag in
> case someone tries to use the doc later.  I've been convinced a warning
> flag is better than an internal sweep-it-under-the-rug.

fwiw, I conceptually like elh's parent.detach(element) approach. But 
this is one of those places where I think that the ISE would actually do 
it's job. It'll get thrown during testing if a programmer has got a tree 
transform wrong, otherwise it'll just be fine.

James Duncan Davidson
duncan at x180.net

More information about the jdom-interest mailing list