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

Re: Selectors: section 6.5: Error

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

On Thu, 29 Dec 2005, Elliotte Harold wrote:
> > 
> > I have rephrased the sentence to say " What makes attributes of type 
> > ID special is that no two such attributes can have the same value in a 
> > conformant document...". I will let you know if the working group 
> > disagrees with this change when it is reviewed.
> 
> I don't like the word "conformant". The questions is, conformant to 
> what?

To any relevant specification.


> "Valid" at least is a little better defined with respect to HTML and 
> XML.

"Valid" wouldn't cover xml:id or XHTML document fragments.


> Also, are we really sure that all document languages will have the rule 
> that IDs do not repeat values?

Yes, that's the whole point of IDs. If they're not intended to be unique, 
then they aren't IDs.


> certainly that's a rule for valid HTML, XML, and SVG; but it's always 
> struck me as a slightly funny one. Might there be a document language 
> that does not have such a rule?

If so, then it is broken.


> > > 2. Specify what happens when multiple elements share the same ID.
> > 
> > This is already specified: "ID selectors represent an element instance 
> > based on its identifier", meaning that if the ID of an element is the 
> > same as the ID of the rule, it matches.
> 
> OK. That sounds reasonable. However I don't think it's totally obvious 
> from the wording, so I would suggest adding a slightly redundant 
> rephrasing such as, "If multiple elements share the same ID, then all 
> are represented by an ID selector on that value." or something along 
> those lines.

You're right, the text is poorly worded. I have rephrased the paragraph to 
read:

# An ID-typed attribute of a document language allows authors to assign an 
# identifier to one element instance in the document tree. An ID selector 
# contains a "number sign" (U+0023, #) immediately followed by the ID 
# value, which must be an identifier. An ID selector represents an element 
# instance that has an identifier that matches the identifier in the ID 
# selector.

I do not feel comfortable explicitly mentioning what should happen in 
cases where multiple elements have an ID, because it does not make sense 
to have more than one element be represented by a selector in the case of 
a selector used as a creation expression (as in, e.g., STTS).

Please let me know if this does not resolve your issue satisfactorily. If 
it does, I will let you know if the working group disagrees with the new 
wording when they review my changes.

-- 
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:25:39 GMT

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