Re: CSS selectors and xml:id

On Mon, 9 May 2005, Chris Lilley wrote:
>
> Not really. CSS can
> 
> a) require xml:id support
> b) requires that if CSS is supported AND xml:id is supported THEN xml:id
> be treated as ID for the purpose of selectors
> c) forbid xml:id support
> d) leave it wooly and ambiguous

Options a and c are out of scope of CSS.

Option b sounds reasonable but in reality is the tip of the iceberg, as 
then we would also have to list the bazillion other ways of having IDs, 
and would have to track each and every other way of defining IDs.

Option d is obviously bad.

There is also an option e, and that is the option that the working group 
is following. That is, CSS requires that the ID selector match an element 
that has the given ID. It then leaves the other specs to define what IDs 
an element has. It is up to xml:id to say that it gives an element an ID.

This is similar to how programs have APIs. You don't hardcode every 
possible client into your server, you just provide an abstract interface 
that the clients and servers use to communicate.

Well, here the CSS spec is providing an abstract interface, the concept of 
"attributes that are declared to be of type ID". It is then up to the 
xml:id specification, or some other specification, to state that xml:id 
attributes are of type ID.

Unfortunately, the xml:id specification explicitly doesn't say this. But 
that is a problem with the xml:id spec (which I raised at last call), not 
a problem with the CSS spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 9 May 2005 12:46:24 UTC