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:48:34 -0500

Wolfgang Hoschek wrote:

Thus, I continue to think that an explicit ParentNode.normalizeTexts() is the best way, if any. This approach is easy to understand, works, and few real use cases needs the text merging functionality anyway.


nu.xom.samples.TextMerger already does this. However I don't think this is adequate. The query //data/child::text()[1] should return the same text whether the data element contains consecutive text nodes or not. Requiring the user to perform an explicit merge step (that they may not even want) to get correct XPath resolution does not feel like good design. I want minimum requirements on the user. They give XOM the XPath as a string. XOM gives them back the matching nodes.

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