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

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

From: Michel Fortin <michel.fortin@michelf.com>
Date: Fri, 1 Dec 2006 06:52:20 -0500
Message-ID: <56C84BAC-28D6-4804-8A4C-EAE5AC3CC0EA@michelf.com>
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.


> 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
Received on Friday, 1 December 2006 03:52:20 UTC

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