W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: ITS 2.0, Selectors 4 and Selectors API 2

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Tue, 02 Jul 2013 08:53:19 +0200
Message-ID: <51D278DF.2060409@disruptive-innovations.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>, public-webapps <public-webapps@w3.org>, public-multilingualweb-lt-comments@w3.org, Felix Sasaki <fsasaki@w3.org>
On 02/07/13 04:46, Tab Atkins Jr. wrote:

> That's already the case - the subject indicator has to precede the
> compound selector.

Tab, I know, *I* designed the subject indicator *exactly* the way it
is in the spec back in *1997* in a language called STTS and an
application implementing it...

I meant !foo![attr] is forbidden.

> This is unacceptable for Selectors applied against HTML in general.
> Attributes are *not* nodes, either in HTML or XML, and "![foo]" refers
> to an element.

Unacceptable to you. And pseudo-elements can be selected by CSS without
having any existence as Nodes in the document tree...

![foo] refers to an element *for the time being* in a Draft. "A
Standard is not a Standard before it's published as a Standard". And
Selectors are a selecting mechanism, the CSS case being one particular
case only. ITS proves Selectors are used outside of the CSS world.

The question is the following one: do we want Selectors to become a more
generic mechanism approaching, and possibly eventually replacing, the
power of XPath? If I look at all the additions to Selectors lev4, the
answer is obviously yes. And if you ask me, yes, we should make CSS
a selecting mechanism widely usable in full replacement of XPath.
FWIW, please see the section on STTS in HÃ¥kon's thesis and its ACK

> I am strongly against Selectors returning different results when used
> in CSS versus qSA/find.

I never said that. I said a p![foo] would select an attribute in both
querySelectorAll() and CSS, but it would not trigger any style in CSS.
We already have similar mechanisms in CSS, with restricted sets of
properties applicable to pseudo-elements.

> If you want Selectors to be able to select attribute nodes, address it
> directly with a new selector.  This should not be smuggled in via the
> subject indicator.

That would be a new char or ident or whatever serving exactly the
purpose of !... But why not. I want the feature, and I'm not focused
on !.

The meta-question still stands: how do we serve better W3C
specifications like ITS 2.0?

On 02/07/13 05:26, Liam R E Quin wrote:

> A rigorous comparison of XPath with CSS selectors would be worth doing;
> piecemeal attempts to duplicate functionality don't seem worthwhile to
> me. On the other hand I do agree that it sounds like some limitation in
> CSS selector namespace handling could be alleviated.


Received on Tuesday, 2 July 2013 06:53:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:31 UTC