Re: Document Object Model (DOM) Level 3 XPath Specification

On Monday 18 June 2001 16:29, Philippe Le Hegaret wrote:

> The first public Working Draft for the DOM Level 3 XPath has been
> published: http://www.w3.org/TR/2001/WD-DOM-Level-3-XPath-20010618/
> As usual, comments are welcome,

Ok, I hope these comments will be useful..

My requirements are such that I don't know the return type of evaluating an 
XPath expression in advance. I can't choose between evaluateAs* beforehand.

I would find it much preferable to get a result object. Such a result object 
could indicate its type and be able to return its value as a string, nodeset, 
etc. I would also stress (even though there is some reference to this in the 
document), that it would be vital to be able to pass an evaluation context to 
the functions (i.e. containing variables and so on).

I have further requirements that require the repeated evaluation of XPaths 
(>= 100000 times). I find the Xalan approach quite useful here, which parses 
the path once to be evaluated multiple times. I see quite a bad performance 
hit coming along if I use the interfaces from the draft (which take a string 
rather than a parsed path object.

Having parsed path objects will also make installing extension functions a 
bit more straightforward (the functions can be bound at parsing time by the 
processor).

Christian Nentwich

Received on Thursday, 21 June 2001 10:44:43 UTC