W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: Any update on telcon times?

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 24 Apr 2006 06:59:16 -0700
Message-ID: <444CD9B4.9060906@sicking.cc>
To: Bjoern Hoehrmann <derhoermi@gmx.net>, Web APIs WG <public-webapi@w3.org>

> I personally think ElementTraversal should be replaced by a
> .selectSingleNode() method that supports a small XPath subset,

There is a gigantic difference in performance between selectSingleNode 
and firstElementChild. Just parsing alone will take longer time then 
just iterating the children and finding the first element.

>   .previousElementSibling -> .selectSingleNode('previous-sibling::*')

This will probably not work, unless we create a very complex definition 
of how selectSingleNode works. Usually the result of an XPath evaluation 
is sorted in document order, so this would actually select 

If we want to make that return the previousElementSibling we need to 
define exactly how sorting works in all cases, something i'm very 
reluctant to do, and something that might be hard for implementations 
builing on a generic XPath engine.

/ Jonas
Received on Monday, 24 April 2006 13:59:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC