xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Bill de hÓra <bill AT dehora.net>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Re: XOM 1.0d23 Last Call
- Date: Mon, 09 Feb 2004 21:47:25 +0000
Wolfgang Hoschek wrote:
Just my 5 cents on the namespace and hasChildren issues:
One xom design principle is to avoid convenience methods, thereby making it easier to understand and learn in overall.
IMHO all those methods for no-namespace scenarios (as well as the trivial hasChildren()) are just convenience clutter and hence unnessecary.
I consider namespace scenarios convenience clutter for the most part. But then again, with this line of thought, most OO methods are convenience clutter including getChildCount (why not just compute the count?).
If the javadoc would make it clear that null or "" as URI are intended for the no-namespace scenario, then to me it is not a burden at all to write
new Element("xyz", null)
instead of
new Element("xyz");
For me it is simply poor API design to pass null (there's one exception in Java where I've seen it make sense; Javaspaces). In the abiove case passing should result in an IllegalArgumentException! Plus, I have no interest in catering to soemthing whem I'm not using it.
The get-out for the namespace pov, would be if XOM was an API for processing XML+Namespaces - I don't think that's the case, but if it is, then you'd have a point.
cheers,
Bill de hÓra
-
[XOM-interest] Re: XOM 1.0d23 Last Call,
Wolfgang Hoschek, 02/09/2004
-
Re: [XOM-interest] Re: XOM 1.0d23 Last Call,
Bill de hÓra, 02/09/2004
- Re: [XOM-interest] Re: XOM 1.0d23 Last Call, jcowan, 02/09/2004
- Re: [XOM-interest] Re: XOM 1.0d23 Last Call, Elliotte Rusty Harold, 02/10/2004
-
Re: [XOM-interest] Re: XOM 1.0d23 Last Call,
Bill de hÓra, 02/09/2004
Archive powered by MHonArc 2.6.24.