W3C home > Mailing lists > Public > www-style@w3.org > December 2005

Re: Selectors: terminological: represents vs. selects or matches

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 29 Dec 2005 17:27:23 +0000 (UTC)
To: Elliotte Harold <elharo@metalab.unc.edu>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.62.0512291725370.17886@dhalsim.dreamhost.com>

On Thu, 29 Dec 2005, Elliotte Harold wrote:
> 
> The Selectors spec says, "A Selector represents a structure." and then 
> proceeds to use the word "represents" throughout the document.
> 
> This language is not at all clear to me. While I can follow it, I think 
> the intent would be clearer if "represents" were replaced by "selects" 
> or "matches". e.g. in 6.5.1 "ID selectors match/select an element 
> instance based on its identifier."

The problem is that, as mentioned in a couple of places in the draft, 
Selectors can be used for more than just matching.

For example, you could have a DOM method:

   var x = document.createNodeFromSelector("a[href=foo][title=bar]");

...and then have that method return an element "a" that has two 
attributes, href and title. STTS uses this, for example.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 29 December 2005 17:27:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT