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

Re: comments on Selectors API WD

From: Robin Berjon <robin.berjon@expway.fr>
Date: Mon, 2 Oct 2006 11:31:30 +0200
Message-Id: <757ADC0F-697F-4DEE-BB59-7859A601552C@expway.fr>
Cc: public-webapi@w3.org
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>

On Sep 30, 2006, at 04:21, Daniel Glazman wrote:
> Robin Berjon wrote:
>> I don't think we need to cram as many features as possible into  
>> v1. Defining the exact semantics of scoped CSS selectors can be a  
>> little tricky, and it clearly is the job of the CSS WG to do so.  
>> The WG thinks
>
> Tricky. Ah. When it comes to defining how matchSingle() and matchAll()
> work, I fail to see how, sorry. You don't have to worry about
> specificity, cascade or precedence because Selectors API do not deal
> with it!

We have to worry about defining how scoped selectors work. *That* is  
the tricky part. It's not a question of being technically difficult,  
it's a question of overstepping our boundaries.

> A stylesheet applies to a subtree, that subtree being the whole
> document. A scoped stylesheet applies to a deeper subtree, that's all.

No it's not all, as you note immediately after this paragraph there  
is at least one issue.

> The one and only issue is the :root matching, and it makes perfect
> sense here to say it matches the root of the subtree because there
> is no other root element in this context ! The other option, ie match
> the root of the document, is pure non-sense... In the scope, that
> element is just not visible.

And here you prove my point. I come to the exact opposite conclusion  
from you. I think that having :root match the root of the subtree and  
not that of the entire tree is pure nonsense. Again, it's not up to  
us to decide.

If we do get to make that kind of decision, the first thing I'll ask  
for is to rename the "Selectors" draft to something sensible that  
reflects its content :-D

> I thought your WG was more "disruptive" than that :-)

Seriously, we're really, really not! Boring and conservative, that's us!

> More seriously, I really think this WD does not push far enough.
> The cost is little. Your WG and the CSS WG could probably solve this
> quickly.

If the cost is small then it'll be just as small in v2.

>>> 4. I really hate having two different methods for matchSingle and
>>>    matchAll, and I'd prefer a single method with a boolean  
>>> indicating
>>>    if only the first result should be retrieved or all.
>> I think that's largely a matter of taste, isn't it?
>
> No. That's a matter of consistency. Having similar methods both
> performing a search, the result of the first one being a subset
> of the second one, reply similar constructs is a matter of
> consistency.

I don't see the consistency argument here, and I really do dislike  
methods that pile up long lists of ordered boolean arguments. It  
always starts with one, too.

-- 
Robin Berjon
    Senior Research Scientist
    Expway, http://expway.com/
Received on Monday, 2 October 2006 09:31:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:56 GMT