Boris Kolpackov wrote:
John Snelson <[EMAIL PROTECTED]> writes:
I've also changed my mind (again) about the DOMXPathResult object. The
problem is this - DOMXPathResult::iterateNext() returns DOMNode, because
in XPath 1 you can only get single values of a list of nodes. XQilla's
XPath2Result::iterateNext() returns a bool, and simply moved the
iterator to look at the next item in the sequence, which in XPath 2.0
can be a heterogeneous sequence of nodes and values. The same is true
for snapshotItem(). I've come to the conclusion that it would be best
for XQilla to stick with the XPath2Result API, and it would be good if
Xerces-C incorporated it into it's API.
Since the XPath 2 approach is more generic and can supports XPath
1 requirements, I think we should just change the DOMXPathResult
interface to return bool from iterateNext() and snapshotItem().
I'm not so sure about that. The existing DOMXPathResult is an
implementation of a W3C published DOM interface, and I think there's
value in keeping it that way. There's all sorts of improvements I'd like
to make to W3C DOM otherwise ;-).
John
--
John Snelson, Oracle Corporation http://snelson.org.uk/john
Berkeley DB XML: http://oracle.com/database/berkeley-db/xml
XQilla: http://xqilla.sourceforge.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]