W3C home > Mailing lists > Public > www-style@w3.org > October 2009

xml|lang|= and xml|lang= selectors don't work

From: Richard Ishida <ishida@w3.org>
Date: Mon, 5 Oct 2009 16:21:35 +0100
To: <www-style@w3.org>
Cc: <public-i18n-core@w3.org>
Message-ID: <00ee01ca45cf$875ce780$9616b680$@org>
While trying to provide advice to someone about how to style content that uses xml:lang, I just updated the i18n tests for CSS selectors that identify language to apply styling and was surprised to find that Firefox, Safari, Chrome and Opera fail to style content when you try do something like 

@namespace xml "http://www.w3.org/XML/1998/";
div[xml|lang|="ar"] { ... } 


@namespace xml "http://www.w3.org/XML/1998/";
div[xml|lang="ar"] { ... } 

:lang works fine, but |= and = don't.  And yet, something like 

div[test|lang="ar"] { ... }

works fine.  The problems appear to be specific to the xml: namespace.

Firefox appears to take a further step in the wrong direction by actually producing the styling if the @namespace for xml is omitted from the style rules.

Could someone confirm for me that I'm not doing something stupid?

You can find the tests and links to the results here:




If I'm not in error somewhere, then I think that the browser folks on this list should raise bug reports for this.

Received on Monday, 5 October 2009 15:22:04 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:40 UTC