W3C home > Mailing lists > Public > www-style@w3.org > January 2006

Re: Selectors: section 6.5: Error

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Fri, 06 Jan 2006 07:54:54 -0600
Message-ID: <43BE76AE.9010007@mit.edu>
To: David Woolley <david@djwhome.demon.co.uk>
CC: www-style@w3.org

David Woolley wrote:
>> and then wants all the rules that apply to it, typically.  So you're saying that 
>> whether an id selector applies should require examining all elements preceding 
>> this one in a depth-first preorder traversal of the DOM?
> 
> Conceptually, although it would probably be better to say that selects
> the same one as the DOM 1 get element by ID method, and then place any
> error recovery requiremnts on that.

The DOM method explicitly has undefined behavior, last I checked.

>> Sounds slow to me.  :(  Especially on dynamic changes.
> 
> That depends on the physical implementation

I haven't thought of a fast physical implementation yet (though I've not put 
much time into it, frankly).  Feel free to suggest one.

>> One usually matches rules to an element, not elements to a rule.
> 
> That's an example of a matching mechanism that finds all matches.

And the matching mechanism best suited for dealing with situations where 
elements change more often than rules (eg the Web).

-Boris
Received on Friday, 6 January 2006 13:55:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT