Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Iterable Elements

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Randall R Schulz <rschulz AT sonic.net>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Iterable Elements
  • Date: Tue, 29 May 2007 18:46:45 -0700

Elliotte,

On Tuesday 29 May 2007 18:17, Elliotte Harold wrote:
> Cass Costello wrote:
> > What are the disadvantages you see, Elliotte?
>
> Incompatibility with everyone still on 1.4 is the big problem.

Java 5 / 1.5 was released by Sun two years and eight months ago today.
We're very far out from that release. Compatibility with 1.4 is a
dinosaur problem, and it is highly dubious whether institutions that
cannot find a way to migrate to 1.5 should dominate the decisions of
library providers.


> It would also needlessly duplicate functionality in the API. In XOM
> there's exactly one way to do it, and Iterator isn't it. Use a
> NodeList.
>
> Finally, you'd have to figure out what to do about the remove()
> operation. I don't think there's a good answer for that.

There's no obligation to implement remove(). You can throw an
OperationNotSupportedException while remaining compliant with the API
specification. See <http://java.sun.com/j2se/1.5.0/docs/api/> for
confirmation.


> XOM quite deliberately does not expose overly generic collections
> APIs that don't perfectly fit the problem space. I don't intend to
> start now.

Iteration over interior nodes does not "perfectly fit" an object model
that is strictly tree structured? That's hard to accept or defend.


Randall Schulz




Archive powered by MHonArc 2.6.24.

Top of Page