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

Re: Question about linking CSS to XML vocabularies

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 28 Dec 2006 19:54:00 +0100
To: "Mike Bremford" <mike-css@bfo.co.uk>
Cc: www-style@w3.org
Message-ID: <op.tk99gaod64w2qv@id-c0020>

On Thu, 28 Dec 2006 19:46:29 +0100, Mike Bremford <mike-css@bfo.co.uk>  
wrote:
> Styling of arbitrary XML doesn't require any additional attributes to be  
> added. The "#id" and ".class" selectors are just syntactic sugar for the  
> attribute selectors "[id=id]" and "[class~=class]" - there is nothing  
> special about those attributes in CSS, and they don't need to exist in  
> your XML vocabulary.

This is partially inaccurate. #foo matches any element with an ID of  
"foo". This is different from any element with an "id" attribute whose  
value is "foo" (which is what you're suggesting). The same applies to the  
class selector. Of course, this difference is quite theoretical as long as  
you use CSS over the web (where you shouldn't use proprietary formats).


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Thursday, 28 December 2006 18:54:12 GMT

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