Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] LeafNode to be deleted?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Nils_Kilden-Pedersen AT Countrywide.Com
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] LeafNode to be deleted?
  • Date: Wed, 11 Feb 2004 09:59:56 -0800

Now you've got me confused. LeafNode saves code duplication AND fits your
abstraction perfectly.
The semantics make sense, so why delete it? To save a class?

xom-interest-bounces AT lists.ibiblio.org wrote on 02/11/2004 06:32:20 AM:

> Is anyone using LeafNode for anything? Would anybody be horribly
> inconvenienced if it disappeared? I was looking at it yesterday, and
> it really is mostly an implementation detail designed to avoid code
> duplication in a few classes; but my experience is people pay more
> attention to it than it deserves; and I should probably just push the
> two methods it has (getChild() and getChildCount()) down into the
> four subclasses (Text, ProcessingInstruction, Comment, and DocType).
> I doubt any code would break unless someone is doing instanceof
> LeafNode somewhere.
> --
>
> 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 mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>




Archive powered by MHonArc 2.6.24.

Top of Page