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: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Michael Kay <mike AT saxonica.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] RE: XPath support in XOM
  • Date: Mon, 10 Jan 2005 14:53:09 -0500

Michael Kay wrote:

I've raised a note with the WGs about whether we should relax this
constraint. It's appropriate that a data model constructed by parsing raw
XML, and a data model constructed by XSLT or XQuery should have conjoined
text nodes, but I can't see a strong reason why a data model constructed
programmatically should have to obey this constraint.

Is there a reference so I can respond?

I'm not convinced XPath is wrong here. I'm not doing this solely out of conformance with the XPath spec. I'm about 70% convinced that XPath made the right decision to disallow adjacent text nodes.

The fact is that the XML structures in the document are the only reliable ones XPath can ever see. Object boundaries are just a little too contingent for my comfort. For instance, would you want an expression like count(div//node()) to return different values depending solely on how many Text objects made up the exact same content? Treating contiguous Text objects as part of the same text node just seems more reproducible and reliable.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page