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: "Michael Kay" <mike AT saxonica.com>
  • To: "'Wolfgang Hoschek'" <whoschek AT lbl.gov>, "'Bradley S. Huffman'" <hip AT a.cs.okstate.edu>
  • Cc: 'Elliotte Harold' <elharo AT metalab.unc.edu>, xom-interest AT lists.ibiblio.org
  • Subject: RE: [XOM-interest] XOM 1.1: XPath
  • Date: Sat, 8 Jan 2005 09:55:33 -0000

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

You need to think in terms of two views: the XOM view, and the XPath view.
The merged node appears only in the XPath view, it should never be visible
in the XOM view. An XPath expression that finds the merged node should
return the first corresponding text node back across the API, it should not
make the merged node visible. This way, both views of the tree are
consistent in their own terms.

I think this can be made to work.

Michael Kay
http://www.saxonica.com/





Archive powered by MHonArc 2.6.24.

Top of Page