Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] RE: XPath support in XOM

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: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] RE: XPath support in XOM
  • Date: Mon, 10 Jan 2005 15:30:07 -0600

Elliotte Harold writes:

> Michael Kay wrote:
>
> > If the user controls how many text node objects there are, and if XOM
> > gives
> > different results depending how many there are, then I'm happy for XPath
> > to
> > do likewise. I think this is better than ./text()[contains(., "o")]
> > returning 4 text nodes of which only one contains an "o".
>
> But it doesn't return 4 text nodes. It returns 4 Text objects, which
> together make up 1 text node. That's a crucial distinction.

Hmmm, what if the context is "makes ", "a", " good", " point.",
<someElement/>,
" Yes", " he", " does!". Now don't you have the expression returning 7 Text
objects representing 2 text nodes? But since all Text objects have the
same parent you can't distinguish which ones belong to which text node.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page