W3C home > Mailing lists > Public > www-style@w3.org > January 2003

Re: css, namespaces and default properties

From: Jonny Axelsson <jax@opera.no>
Date: Tue, 21 Jan 2003 08:36:18 +0100
To: www-style@w3.org
Message-ID: <oprjb92sogiaf507@localhost>

On Tue, 21 Jan 2003 03:50:10 +0100, Christoph Päper <christoph.paeper@tu- 
clausthal.de> wrote:

> I don't know the answer to your question, but you should use attribute
> selectors here:
>
> element[class~"name"] {...},
>
> because the dot notation for classes is only intended for HTML. See REC- 
> CSS2 5.8.3.

Or more exact, it is intended to work with HTML. There is nothing to 
prevent it work with other languages. It will not work with pure XML 
though, as XML doesn't support the RTFM Protocol.

As it has been more clearly stated in the Selectors draft [1]:

<< Note: UAs may apply selectors using the period (.) notation in XML 
documents if the UA has namespace specific knowledge that allows it to 
determine which attribute is the "class" attribute for the respective 
namespace.  One such example of namespace specific knowledge is the prose 
in the specification for a particular namespace (e.g. SVG 1.0 describes the 
SVG "class" attribute and how a UA should interpret it, and similarly 
MathML 1.01 describes the MathML "class" attribute.)        >>

[1] <http://www.w3.org/TR/css3-selectors/#class-html>



-- 
Jonny Axelsson,
Web Standards,
Opera Software
Received on Tuesday, 21 January 2003 02:38:37 GMT

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