W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > January 2013

RE: question on issue-110 (xml:lang vs. lang)

From: Yves Savourel <ysavourel@enlaso.com>
Date: Wed, 30 Jan 2013 08:38:39 -0700
To: <public-multilingualweb-lt@w3.org>
Message-ID: <assp.0742f4fb6c.assp.0742173338.000f01cdfeff$e07f5810$a17e0830$@com>
Thanks Leroy,

But now we have an XHTML document in our HTML5 test suite.
I don’t think that is correct.

Jirka pointed to the HTML5 part of the specification that deals with xml:lang:

It says: “Authors must not use the lang attribute in the XML namespace on HTML elements in HTML documents."

And also: "To ease migration to and from XHTML, authors may specify an attribute in no namespace with no prefix and with the literal localname "xml:lang" on HTML elements in HTML documents, but such attributes must only be specified if a lang attribute in no namespace is also specified, and both attributes must have the same value when compared in an ASCII case-insensitive manner."

So my conclusion is:

a) we can use "xml:lang" in an HTML5 document, but that's not the XML's xml:lang, and it must be there only when lang is also there.

b) if both the 'xml:lang' and lang attributes are present the document is not valid if the values are not the same (in an ASCII case-insensitive manner)

--> Therefore we cannot have valid HTML5 document with lang and xml:lang with different values,
--> therefore we can just read the lang attribute to get the right value
--> therefore we should not have any precedence expectation, nor test for it.

Received on Wednesday, 30 January 2013 15:39:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:00 UTC