Boris Kolpackov wrote:
Hi John, Gareth,
John Snelson <[EMAIL PROTECTED]> writes:
It was off some draft note. Some conversation and the note is here:
http://lists.w3.org/Archives/Public/www-dom/2003JulSep/0125.html
Now I look at that link I remember reading it before. That leaves me a
little uncertain about what to do. Maybe we should add DOMXPathResult2
to Xerces-C based on this note - any opinions?
What puzzles me in this note is that it appears the author tried to
make the XPath2Result interface as incompatible with XPathResult as
he possibly could. For example the original interface has accessors
named as getBooleanValue, getNumberValue, etc. The new interface for
some reason uses asBoolean, asDouble, etc. This makes me question the
seriousness of the author's effort. Also, I am wondering if anything
came out of this, e.g., was it submitted to W3C for recommendation as
suggested in the email? Perhaps there is something newer than this?
I also wonder what other XPath 2 implementations did.
I don't know of anyone else who's tried to implement the DOM3 XPath API
for XPath 2.0.
The more I read through that thread of discussion, the more I realise
that there's nothing like consensus for what a DOM XPath 2.0 API would
look like. Since I think that I can certainly implement DOMXPathResult
in XQilla, why don't we just extend that class a little. I suggest
adding two methods:
const DOMTypeInfo *getTypeInfo() const;
int getIntegerValue() const;
I don't mind having XPath2 as a separate interface (note that it
appears from the email discussion that it should be DOMXPath2Result
and not DOMXPathResult2). The question is do we make it as
inconsistent as the author suggests or do we try to make it more
in line with XPathResult?
Lets not bother - it's too much effort for very little gain. I strongly
suspect that there'll never be an official DOM XPath 2.0 API, so XQilla
gets more interoperability by implementing DOMXPathResult.
BTW, we probably will want to extend XPathNSResolver interface
as well to add addNamespaceBinding() so that the user does not
need to cast it to XQillaNSResolver.
Sounds good to me.
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]