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: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: "Bradley S. Huffman" <hip AT a.cs.okstate.edu>, xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Sat, 08 Jan 2005 08:38:28 -0500

Wolfgang Hoschek wrote:


The more i think about the adjacent text node issue the more i think i can't be handled cleanly inside an XPath impl running over XOM, even if one wanted to handle it. If an XPath impl merges text nodes into a virtual (but not actual) text node, what's the XOM parent node of that virtual text node?

The more I think about this the more I'm convinced this is not a theoretical problem; i.e. it should be doable. There may be implementation issues inside th XPath engine, but there's no fundamental reason an XPath engine shouldn't be able to handle this.

To answer the specific question you ask, the parent of the virtual node is the parent of the text nodes that comprise the virtual node.

All we need to do to make this work (in theory, implementation details could be tricky) is add one additional layer between XOM and Saxon/Jaxen/etc., which we need anyway. I'm not explaining myself very well here (haven't had my morning coffee yet) but I really think it's doable and much more consistent and easy to explain than the alternative. It's harder to implement, but I do think it's worth implementing.

--
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