Re: lang and xml:lang Re: 3.4. Global attributes

On Tue, 31 Jul 2007 07:01:10 +0200, Karl Dubost <> wrote:
> Le 30 juil. 2007 à 21:40, Anne van Kesteren a écrit :
>>> 3.4.3. The lang (HTML only) and xml:lang (XML only) attributes
>>> Disappointed that this explicitly requires different attributes for
>>> each serialisation (but can't offer a solution).
>> I still think it makes some sense to allow lang= in both.
> Note that the specification already handles the case where both values  
> are present.


> The xml:lang processing is given by XML specification. I do not see  
> differences so far between the requirements in HTML 5 and XML. So HTML 5  
> could just refer to this section for the processing.

Actually, I'm not sure XML handles cases like (what's the language of A  
and what's the language of B?):

   <div lang="foo">
       <div lang="bar" xml:lang="baz">

xml:lang precedence (even in HTML) has been a source of confusion and user  
agent bugs in the past (maybe it's still a problem in some UAs) so it  
seems better to let HTML 5 be explicit about it.

Anne van Kesteren

Received on Tuesday, 31 July 2007 08:39:47 UTC