Re: [selectors4] Proposal for extending Selectors Level 4 with possibility to select attributes

> Very first sentence of abstracts contains:
>
> "... that can be used to select *nodes* in an XML document.”
>
> hence why I think that selectors shouldn't cover just elements. If the intent of selectors was always cover just elements and nothing else then spec wording should be changed and all mentions of nodes should be replaced by elements so there is no confusion about possible scope of the spec.

I think the issue in question here is that in HTML and in the DOM used by browsers, an attribute is not a node. Whereas of course in XML and in the XML DOM, it is.

If you wish to use HTML APIs like querySelector or querySelectorAll, you should using the HTML definition of node, which does not include attributes. I believe the abstract you are referencing uses the HTML definition of node, thus the confusion.

Received on Monday, 11 November 2013 19:55:16 UTC