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

Michel Fortin michel.fortin at michelf.com
Fri Dec 1 14:44:51 PST 2006

Le 1 déc. 2006 à 11:44, Ian Hickson a écrit :

> On Fri, 1 Dec 2006, Michel Fortin wrote:
>> 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.
> Could you propose some text?

What about adding at the end of this paragraph:

"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."

the following sentence:

"Note that the xml:lang attribute can only be set via scripting for  
HTML documents, since the HTML parser does not handle namespaces."

I guess that new sentence is totally obvious when you've read the  
Terminology section, but I still think it's important because  
xml:lang is used a lot in XHTML1 documents served as text/html, and  
people will be referring to this part of the spec to know what  
browsers do about them so it ought to be clear.

Michel Fortin
michel.fortin at michelf.com

More information about the whatwg mailing list