[Bug 10152] [polyglot] i18n comment 5 : Mention lang and xml:lang

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10152

--- Comment #10 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> 2011-03-09 15:03:30 UTC ---
(In reply to comment #9)
> Hold on. As far as I'm aware XML processors have no way of detecting the
> language of a document from a meta element.  The prescribed way according to
> the XML spec is to use the xml:lang attribute, and this is what XML processors
> such as XSLT expect to find for their functions. 
> 
> Since a polyglot document represents the subset of markup that works as both
> HTML and XML, then this note should NOT be included.  Language should be set
> using the xml:lang + lang attributes only to set language of the root element
> for polyglot documents. Even if the current HTML spec doesn't change, the use
> of meta for establishing the language of the root element is therefore moot.
> 
> Proposed action: remove the note.

Polyglot allows <meta charset="UTF-8"/> despite that it doesn't work in XML. We
can say that it, in principle, allows <meta charset="<anyvalue>"/>.

*WHEN* <meta charset="<anyvalue>"/> is used, the encoding must simultaneously
be declared/made known for XML parsers. And, because <?xml
encoding="<anyvalue>"/> is forbidden, the  the  document, as well as the <meta
charset="*"/> MUST - THUS -  be UTF-8. 

This is very similar to the issue at hand: *IF* <meta
http-equiv="Content-Language" content="*" />
is present, then there is a REQUIREMENT to also delcare the language. Thus,
both xml:lang="*" and lang="*" must, in that case bse used. (Otherwise it is
completely up to the author whether he wants to declare a language or not.)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 9 March 2011 15:03:35 UTC