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

The spec tells us:

> The lang attribute only applies to HTML documents. Authors must not  
> use the lang attribute in XML documents. Authors must instead use  
> the xml:lang attribute, defined in XML. [XML]
>
> To determine the language of a node, user agents must look at the  
> nearest ancestor element (including the element itself if the node  
> is an element) that has a lang or xml:lang attribute set. That  
> specifies the language of the node.
>
> 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.


Also:

> The id DOM attribute must reflect the id content attribute.

Does that mean it should not reflect xml:id even when id is not defined?


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

Received on Friday, 1 December 2006 03:52:20 UTC