RE: [dom-xpath] XPath or? (was RE: Announcing www-dom-xpath@w3.org)

     
     > So, what is wrong with the proposal
     >
     >   NodeList getNodesByXPath(DOMString xpathExpression)
     
     1) It implies that the DOM implementor should create this 
     functionality, as
     opposed to an outside module.  Modularity is good, in my 
     opinion, and DOM
     is missing on this.

+1 on that. If we added xpath, why not Netscapes 'chrome' layer
as well. I'd stand by a modular approach.
     
 
     
     3)  You should be able to compile the XPath, and then run it 
     over and over
     again using different contexts.

What justification would there be for this Scott? Under what
circumstances would the speed gain be of use?

     
     4) Given the above method, what is the namespace context of 
     the expression
     (i.e. where to prefixes get resolved?  Should not be relative 
     to the node
     being queried.)

Nasty one. This implies a closer coupling to the dom than 
has been previously stated. Can I query dom for a namespace list?



     
     > - The result shouldn't be a NodeList
     
     Yes, right, though you need a convenience method for this, in 
     my opinion.

Agreed, the one I've seen using Enumeration wasn't very 'natural'.
     
     > - We should allow other query languages than XPath
     
     Yes.
+1
     
     How about something like the following?
     
<snip/>

What about variables? They appear not to 'fit' with this model
very easily. How much of a restriction is it to not have them
available?

     
DaveP
     

Received on Wednesday, 3 May 2000 01:25:53 UTC