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

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

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Mon, 11 Nov 2013 19:54:47 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <4B4A7C7C-D4AA-4CA3-B180-DC907D35CC62@domenicdenicola.com>
> 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

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