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 19:31:03 -0500

Wolfgang Hoschek wrote:


Either that (output 1), or a list with a single XOM text node having no parent, containing the concatenation of t1, t2 and t3 (output 2). The problem is that neither output is satisfactory from a certain angle. The only really satisfactory output would be a single XOM text node having the parent of t1, t2 and t3, containing the concatenation of t1, t2 and t3 (output 3). But output 3 isn't possible with XOM unless the texts were merged before passing them into XPath because XPath is a read-only model.

A user might expect output 1, 2 or 3 when matching on text = "helloworldnux", depending how he looks at the problem. What do we do? Any ideas what other engines output when running over external tree models?

I disagree. I think output 1 is clearly correct. Anything else is suboptimal. If a user is confused by output 1, then it is because they are confused by XPath and the unfortunate impedance mismatch between XPath and XOM. The more I think about this the more I'm convinced that output 1 is right.

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