W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2005

[whatwg] [WA1] lang and xml:lang

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 17 Apr 2005 10:56:55 +0000 (UTC)
Message-ID: <Pine.LNX.4.61.0504171042040.20636@dhalsim.dreamhost.com>
On Sun, 17 Apr 2005, Lachlan Hunt wrote:
> # If both the xml:lang attribute and the lang attribute are set, user
> # agents must use the xml:lang attribute, and the lang attribute must be
> # ignored for the purposes of determining the element's language.
> Is that the case for both HTML and XHTML documents?


> It would make more sense if, in the case of both being set, lang was 
> used for text/html documents and xml:lang for XML documents.

The only way you can set xml:lang in an HTML document is via the DOM (in 
HTML, there are no namespaces). I don't think it's worth having special 
requirements for something that no-one is likely to ever do outside of 
obscure test cases.

> However, in the case of only one being set but for the wrong MIME type 
> (eg. xml:lang set for text/html document or lang for XML document), for 
> error recovery, should UAs be allowed to fallback on it?

If xml:lang="" is set onin a text/html document, it'll be {html, 
'xml:lang'}, not {xml, 'lang'} which is what xml:lang really is.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 17 April 2005 03:56:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:22 UTC