Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] Suggestion: add "public String getValue()"

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>, <xom-interest AT lists.ibiblio.org>
  • Cc:
  • Subject: RE: [XOM-interest] Suggestion: add "public String getValue()"
  • Date: Sat, 8 Jan 2005 09:50:54 -0000

> Small suggestion: In XPath, the string value of a node
> sequence is well defined.

There's a big incompatibility here between XPath 1.0 and 2.0: XPath 1.0
gives you the string value of the first node in the sequence, while 2.0
gives you an error if the sequence contains more than one node.

So I would steer well clear of this.

It reminds me of another detail. XPath 1.0 returns node-sets, not sequences;
the nodes have no intrinsic ordering. But anyone used to XSLT expects to get
the nodes in document order, because that's how XSLT processes them; and
XPath 2.0 generally returns the results in document order. So you should
specify in the API that an XPath 1.0 node-set will be returned as a list in
document order.

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





Archive powered by MHonArc 2.6.24.

Top of Page