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

Michel Fortin michel.fortin at michelf.com
Fri Dec 1 06:47:13 PST 2006


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/





More information about the whatwg mailing list