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"] { ... } 

or 

@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:

http://www.w3.org/International/tests/list-html-css#colonlangxml

http://www.w3.org/International/tests/list-html-css#langbarequalxml

http://www.w3.org/International/tests/list-html-css#langequalxml

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

Cheers,
RI
Received on Monday, 5 October 2009 15:22:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:21 GMT