On Wed, 30 Aug 2006 10:57:51 +0700, Andrew Fedoniouk <[EMAIL PROTECTED]> wrote:
>>> Probably, lists should implement a special DOM interface which allows to
>>> iterate over the list items. Tables have such an interface.
> Why not to implement just one simple function:
>
> function foo(element) { ... }
> ...
> someListElement.select( "li", foo);
> -or-
> someListElement.select( "li:not(li li)", foo);
>
> instead of multiplying that interfaces?
This is guessing. Right now, it took you two attempts to construct a selector
which doesn't match too many or too little nodes. Note that rules may change in
the future. For example, there has been a proposal to allow OL and UL as direct
descendants of other OL or UL -- if this is accepted, you'll need to update
your selectors once again, making them still more complex.
On the other hand, the list can be required to "know" what its items are.
--
Alexey Feldgendler <[EMAIL PROTECTED]>
[ICQ: 115226275] http://feldgendler.livejournal.com