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

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

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Mon, 29 Aug 2011 16:20:37 +0000
To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>, Bjoern Hoehrmann <derhoermi@gmx.net>
CC: WWW Style <www-style@w3.org>, John Hax <johnhax@gmail.com>
Message-ID: <07349ECFC3608F48BC3B10459913E70B148645C7@TK5EX14MBXC294.redmond.corp.microsoft.com>
On Friday, August 26, 2011 5:13 PM Kang-Hao (Kenny) Lu
> (11/08/27 8:00), Bjoern Hoehrmann wrote:
> > * Arron Eicholz wrote:
> >> Actually I just want us to properly match what the RFC4647 says is
> >> valid for matching language identifiers. This would mean that
> >> :lang(*) would be valid but also :lang(en-*) or :lang(*-Latn) or even
> >> :lang(en-Latn-*) and other variants that possibly include a *.
> > Well, RFC 4647 defines `language-range` and `extended-language-range`
> > and subtag wildcards are only possible with the latter. I am not sure
> > whether you think subtag wildcards is an important feature needed by
> > CSS authors; if it is not, then :lang() should not be changed at all.
> 
> The HTML5 Chinese IG is actually writing a wiki page to collect use cases of
> such and hopefully we'll have a fair assessment of how much this is needed.
> This is especially useful for us because we are in a messy situation where all
> the below are possible values for a Chinese page:
> 
> zh
> zh-hant
> zh-tw
> zh-hant-tw
> zh-hans-cn
> cmn-Hant-TW
> cmn-Hans-CN
> yue-Hant-HK
> 
> and so on

We are already seeing increased usage of some of these language descriptors. I look forward to seeing the wiki page and understanding more results. Seeing what usage there is could be helpful in the future.

I think we are getting somewhat off my original point. I'm not asking to change the definition of :lang(). It is already defined to support BCP47 which includes RFC4647 for any matching that it needs to do. What is incorrect now is the grammar defining what can go into :lang(). This grammar was never updated to account for changes when RFC4647 was created to replace parts of RFC3066 within BCP47. The spec states that you should use the successor to BCP47 which means if the grammar requirements change for the successor (within RFC5646 and RFC4647) then the grammar in CSS should change.

In the end this is just a tweak to the grammar to account for something that we have already redefined. We have just overlooked some of the pieces that also needed to change.

--
Thanks,
Arron Eicholz
Received on Monday, 29 August 2011 16:21:07 GMT

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