Re: Selectors: section 6.5: Error

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 UTC