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

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.

Arron Eicholz

Received on Monday, 29 August 2011 16:21:07 UTC