[whatwg] lang vs. xml:lang; id vs. xml:id

Le 1 d?c. 2006 ? 8:33, Lachlan Hunt a ?crit :

>>> 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.
>>
>> While the requirement for authors is pretty clear (HTML: lang;  
>> XHTML: xml:lang), it seems to me that the user agent is asked to  
>> always favour xml:lang even in an HTML context. Is this really  
>> what's intended? I think this ought to be clarified.
>
> http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2005- 
> April/003652.html

Okay, so if I understand well, xml:lang in the spec refers to the  
"lang" attribute in the "xml" namespace, not to the "xml:lang"  
attribute in the null namespace that you get with the HTML parser. It  
makes sense from a DOM perspective, but it's misleading from a markup  
perspective, so I still think it should be clarified.

And although it's less confusing, I think the same should be  
clarified about xml:id: it's the "id" attribute in the "xml"  
namespace, not the "xml:id" attribute in the null namespace that you  
get with the HTML parser.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/

Received on Friday, 1 December 2006 06:47:13 UTC