Per HTML5, the @lang attribute can be used in both XHTML and HTML:
"The lang attribute in no namespace may be used on any HTML element." <http://www.w3.org/TR/html5/elements#attr-lang>
"The term "HTML elements", when used in this specification, refers to any element in that namespace, and thus refers to both HTML and XHTML elements." <http://www.w3.org/TR/html5/infrastructure#html-elements>
Therefore, Polyglot Markup should specify that xml:lang is optional.
Aslo see: 16166#c2
(In reply to comment #0)
> Aslo see: 16166#c2
See Bug 16166#c2
I don't believe this is appropriate. See my rationale in comment 7 at https://www.w3.org/Bugs/Public/show_bug.cgi?id=16166
(In reply to comment #2)
> I don't believe this is appropriate. See my rationale in comment 7 at
I don't think your justification there is good enough.
(1) The point is that if one is to make an application/xhtml+xml document, then one isn't required to use xml:lang, if all one cares about is XML-capable HTML5-parsers.
And so, the question begs to be asked: Why must I, suddenly, use xml:lang, it the document
is supposed to be 'polyglot'?
I agree that you, in bug 16166, 7th comment, have pointed out some reasons why an author might want the document to contain xml:lang. But I see no *must* in there - it all depends on how "naked" you expect the XML parser to be.
(2) Meanwhile, in 16166, you suggest that text/html parsers should start to handle xml:lang. So, if that proposal were to be accepted, how would this impact on Polyglot Markup? My presumption is that you would like to be able to produce polyglot markup which contained xml:lang, without any requirement that @lang is present.
(3) HTML+RDFa 1.1 is agnostic about xml:lang versus lang
(4) RDFa Core likewise says: "In XHTML+RDFa [XHTML-RDFA], for example, the XML language attribute @xml:lang or the attribute @lang is used to add this information, whether the plain literal is designated by @content, or by the inline text of the element:"
And so, I maintain that xml:lang should be optional. It would also be good to point out when/for what xml:lang is useful.
This ended abruptly and without conclusive proposed text. The same seems true for bug 16166, in which much relevant discussion took place. Am I to take it that Leif's final thoughts in comment 3 contain the resolution, that xml:lang should be optional?
I tend toward keeping the text as it is, that polyglot markup uses both xml:lang and @lang. If you have come to consensus otherwise, however, I am willing to incorporate that.
(In reply to comment #4)
consider that I have changed my mind: xml:lang should be considered <del>polyglot</del> <ins>robust</ins>. Thus, no change, basically.
The thing is that xml:lang is *not* necessary in XHTML since a conforming XHTML parser will understand the @lang attribute.
However, from a *robust* viewpoint, it can be defended that xml:lang should be in.