W3C home > Mailing lists > Public > www-style@w3.org > August 2011

[css3-selectors] [css4-selectors] [CSS21] pseudo grammar conflicts with BCP 47 (RFC4647) for :lang()

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Fri, 26 Aug 2011 17:21:03 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <07349ECFC3608F48BC3B10459913E70B14862B64@TK5EX14MBXC294.redmond.corp.microsoft.com>
After spending extensive time reading over BCP 47 and the respective RFCs that are related I believe we have a small error in our core grammar that prevents BCP 47 and specifically RFC4647 from working correctly for :lang().

Since :lang() is doing matching against language identifiers the match logic should follow what BCP47 expects for matching. This matching is covered by the RFC4647. The CSS specs assume that matching is covered in these RFCs: RFC5446, RFC4646 or RFC3066, it is not. The :lang() is not identifying languages it is matching language identifiers and thus RFC46474 is relevant.

Here is the specific part of the core grammar that is incorrect: 

Appendix G

pseudo
: ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ]

Needs to be changed to something like this:

pseudo
: ':' [ IDENT | FUNCTION S* [ \*? IDENT S*]? ')' ]

At this point we might not be able to edit in for Selectors Level 3 but we should at least add this to the errata and make the correction in Selectors Level 4. The errata for CSS 2.1 should also get this update as well.

--
Thanks,
Arron Eicholz
Received on Friday, 26 August 2011 17:21:52 GMT

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