Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Attributes, ParentNodes, and "child" nodes ...

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Mike Colbert <mbcolbert AT yahoo.com>
  • To: John Cowan <cowan AT ccil.org>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Attributes, ParentNodes, and "child" nodes ...
  • Date: Thu, 16 Mar 2006 07:26:44 -0800 (PST)

> Can you sketch such a model for us?

I could try, but I'm not sure what good it would do, since a simple sketch
would likely
become completely obsolete as soon as any code to implement it is written.
And
I have a feeling such a project would only show me why things are the way
they are
in the first place.

In any case, I would want to bend the "no interfaces" rule. For example, I
can
imagine Element extending a simplified abstract Node superclass and
implementing
both ParentNode and ChildNode interfaces.

Mike



----- Original Message ----
From: John Cowan <cowan AT ccil.org>
To: Mike Colbert <mbcolbert AT yahoo.com>
Cc: xom-interest AT lists.ibiblio.org
Sent: Thursday, March 16, 2006 8:37:37 AM
Subject: Re: [XOM-interest] Attributes, ParentNodes, and "child" nodes ...


Mike Colbert scripsit:

> Yes, that's another good example. A saner object model would definitely
> go a long way towards simplifying things. As it is, the model is really
> more
> complex than the API will admit to. Talk about a bait and switch. I
> understand this is old news by now, with its roots in DOM, XPath, etc. I
> look forward to a cleaner, more correct model. XOM 2.0?

It's not obvious that making the containers entirely type-safe is a sensible
approach, much less a simpler one. I would need to be convinced that a
class tree could still be constructed, since XOM is about classes not
interfaces.
In addition, there might wind up being more casting anyhow.

Can you sketch such a model for us?

--
John Cowan <cowan AT ccil.org> http://www.ccil.org/~cowan
One time I called in to the central system and started working on a big
thick 'sed' and 'awk' heavy duty data bashing script. One of the geologists
came by, looked over my shoulder and said 'Oh, that happens to me too.
Try hanging up and phoning in again.' --Beverly Erlebacher




Archive powered by MHonArc 2.6.24.

Top of Page