W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2006

[whatwg] Map lang to xml:lang at the parser level

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 26 Oct 2006 16:22:58 +0300
Message-ID: <B10DBBFF-072C-4849-A476-8D34E1F9B01B@iki.fi>
On Oct 24, 2006, at 09:39, Anne van Kesteren wrote:

> On Mon, 23 Oct 2006 12:52:44 +0200, Henri Sivonen <hsivonen at iki.fi>  
> wrote:
>> I think this proposal is definitely worth considering. Would it  
>> have any ill effects on scripting compatibility with Appendix C  
>> XHTML soup served as text/html? In cases like <p lang='en'  
>> xml:lang='fr'> the DOM would not be exactly the same as in legacy  
>> browsers. (I am assuming here that xml:lang='fr' would disappear  
>> in text/html parsing and lang='en' would be treated as a  
>> meaningless attribute on the application/xhtml+xml side.)
>
> Actually, in that case you would have on attribute lang="en" in the  
> XML namespace and one attribute xml:lang="fr" in no namespace.

I take in that you mean the text/html case.

That would be possible in browsers whose DOM implementations need to  
do ugly XML-hostile things for text/html anyway. However, other types  
of programs processing HTML5 using XML tools would have to be allowed  
to consider xml:lang in text/html non-conforming and trashable,  
because what you suggest violates basic assumptions that XML  
processing software is supposed to make or even enforce.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
Received on Thursday, 26 October 2006 06:22:58 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC