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

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 UTC