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

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 01 Sep 2011 02:23:38 +0200
To: Arron Eicholz <Arron.Eicholz@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <k1jt57l1eg3jpsf8u5he1raqu2de5vfcdt@hive.bjoern.hoehrmann.de>
* Arron Eicholz wrote:
>3) The note may be informative however it says that it is recommended
>that you use BCP47 which means if your implementation can support BCP47
>it should. However, the updated BCP47, as I have stated before, has
>changed and now the grammar does not allow for that recommendation to be
>possible.

"It is recommended that documents and protocols indicate language using
codes from BCP 47 [BCP47] or its successor" is addressed to designers of
languages like HTML and protocols like HTTP. You do not use wildcards in
such environments to indicate language. The note says nothing about the
syntax of the :lang pseudo class or matching it against identifiers.

There is no requirement in BCP 47 that I know of that says whenever you
define some syntax to match against language identifiers you must allow
`*` to match "any language" and this is not commonly done either, rather
it is common to omit the filter when all languages match. This is true
for :lang as it is, and also for, say, the systemLanguage attribute in
SVG and SMIL.

It would be perfectly fine for the CSS Working Group to decide allowing
`:lang(*)` or some similar syntax is redundant and unncessary. Same for
all the other protocol elements that filter language in some manner.

Note in particular that the "any language" wildcard is the only one in
the definition for a basic language range in BCP 47. Wildcards for sub-
tags have their separate definition in extended language ranges. There
is no requirement that everyone who uses BCP 47 language identifiers and
defines matching to require support for extended filtering or to use the
syntax specified in BCP 47 for it.

Supporting subtag wildcards might be desirable for :lang, and if that is
allowed it may make sense to allow a plain `:lang(*)` aswell, but you're
framing the discussion around that wrong by claiming there is a bug. It
would be fine for the CSS Working Group to decide subtag wildcards are
not useful for CSS and not add this feature if that is so. There would
be no violation of any BCP 47 requirements that I know of. If there are,
then please do cite them with a proper reference as we'd either have to
remove that requirement from BCP 47 or have to upgrade a large number of
related specifications that violate it.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 1 September 2011 00:24:21 GMT

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