Re: ITS 2.0, Selectors 4 and Selectors API 2

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
section.

> 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.

Exactly.

</Daniel>

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