xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] checkDetach vs. checkRemoveChild
- Date: Tue, 9 Mar 2004 13:05:09 -0500
I Have an action item to consider whether checkDetach and checkRemoveChild are redundant. These aren't quite the same, especially if the parent is subclassed and the child is not (or vice versa) but they are clearly related. I'm wondering if I should remove one of them, and if so which?
Logically checkRemoveChild should stay and checkDetach should go. checkRemoveChild is parallel to checkInsertChild and there's no parallel checkAttach method in Node. Plus checkDetach is inherited by more classes than checkRemoveChild so deleting it is a bigger gain in API simplicity. Furtheremore, there's an existing assymmetry in the code. Calling detach() invokes both checkRemoveChild() and checkDetach(). However, calling removeChild() only results in a call to checkRemoveChild. checkDetach() is not also called.
Thoughts? Comments?
--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
-
[XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
jcowan, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
jcowan, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
John Cowan, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/10/2004
- Re: [XOM-interest] checkDetach vs. checkRemoveChild, John Cowan, 03/10/2004
- Re: [XOM-interest] checkDetach vs. checkRemoveChild, Elliotte Rusty Harold, 03/10/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/10/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
John Cowan, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
jcowan, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
Elliotte Rusty Harold, 03/09/2004
-
Re: [XOM-interest] checkDetach vs. checkRemoveChild,
jcowan, 03/09/2004
Archive powered by MHonArc 2.6.24.