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 05:01:32 -0800 (PST)

> There are plenty of contexts where passing an arbitrary Node won't
> work:
> addChild accepts a Node, but a Document cannot be passed, e.g.

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?

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 12:27:54 AM
Subject: Re: [XOM-interest] Attributes, ParentNodes, and "child" nodes ...

Mike Colbert scripsit:

> It certainly feels broken. Now I'm left guessing what methods in nu.xom
> with parameters of type Node actually do when passed an Attribute. Not
> to mention what methods that return Node or Nodes will ever return
> an Attribute. A lot of this is easy to guess, but that doesn't save you
> much
> work when guessing is not enough.

There are plenty of contexts where passing an arbitrary Node won't work:
addChild accepts a Node, but a Document cannot be passed, e.g.

--
My confusion is rapidly waxing John Cowan
For XML Schema's too taxing: cowan AT ccil.org
I'd use DTDs http://www.ap.org
If they had local trees -- http://www.ccil.org/~cowan
I think I best switch to RELAX NG.







Archive powered by MHonArc 2.6.24.

Top of Page