Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1: XPath

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • To: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Wed, 12 Jan 2005 15:25:31 -0600

John Cowan writes:

> Bradley S. Huffman scripsit:
>
> > But if it's a subclass of ParentNode, it's also a subclass of Node, so I
> > can detach it and try to re-insert it someplace else, which means the
> > core class are going to have to compensate for this special class. Sounds
> > real messy.
>
> Well, presumably this just falls out from the existing implementation of the
> add-a-child methods, which already have to make this check and throw
> IllegalAddException.

A IllegalAddexception for what? I detached the node and if I test the wrapper
for a instance of Node, it returns true. So it looks like a Node, smells
like a Node, but it's not really like any other Node in the API, so why have
it as a subclass Node or ParentNode? As I said drop the insistence on a query
returning a instance of Nodes and return a List of Objects. In this context,
I just don't see the benefit of forcing users to a subset of the XPath API
by restricting the results to the Nodes class.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page