W3C home > Mailing lists > Public > www-international@w3.org > July to September 2008

HTML5 and XML (was: Re: meta content-language)

From: Martin Duerst <duerst@it.aoyama.ac.jp>
Date: Mon, 25 Aug 2008 12:07:18 +0900
Message-Id: <6.0.0.20.2.20080825115339.078935a8@localhost>
To: "Anne van Kesteren" <annevk@opera.com>, "Mark Davis" <mark.davis@icu-project.org>, "Julian Reschke"<julian.reschke@gmx.de>
Cc: "Leif Halvard Silli" <lhs@malform.no>, "Ian Hickson" <ian@hixie.ch>, "HTMLWG" <public-html@w3.org>, "www-international@w3.org"<www-international@w3.org>

[This is somewhat off-topic for www-international, so please
feel free to remove that list in further replies (but maybe
some xml-related list should be added).]

At 23:10 08/08/22, Anne van Kesteren wrote:
>
>On Fri, 22 Aug 2008 15:04:26 +0100, Mark Davis  
><mark.davis@icu-project.org> wrote:
>> 2. Language Inheritance. If there are conflicting languages, what should
>> win? (or in other words, what's the inheritance?)
>>
>> (HTTP) Content-Language: lang1
>> <meta http-equiv="Content-Language" content="lang2"/>
>> <html lang="lang4" xml:lang="lang3">
>> <p lang="lang5">
>> My take is that HTML5 has it right, that the winner/inheritance should  
>> be in
>> the above order: lang5 wins over lang4 over lang3 over lang2 over lang1.
>
>FWIW, this is largely right (interpretation of HTML5), but lang3 would be  
>ignored if it was "xml:lang" not in a namespace and would take precedence  
>over lang4 if it was "lang" in the XML namespace. (This is indeed slightly  
>painful.)

What do you mean by (a) "xml:lang" not in a namespace
                    (b) "lang" in the XML namespace

For (a), I assume this was intended to refer to cases where
the document doesn't contain an in-scope declaration of the form
    xmlns:xml="http://www.w3.org/XML/1998/namespace"


Please note that the XML Namespace recommendation says:

http://www.w3.org/TR/2006/REC-xml-names-20060816/#xmlReserved

Namespace constraint: Reserved Prefixes and Namespace Names

The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. It MAY, but need not, be declared, and MUST NOT be bound to any other namespace name. Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace.


"need not[,] be declared" means that it is IMPOSSIBLE for
xml:lang not to be in a namespace.


As for (b), my guess is that this is supposed to denote cases with e.g.
    xmlns:foo="http://www.w3.org/XML/1998/namespace"
and later
    foo:lang='en'

However, this would be a clear VIOLATION of the XML Namespace Rec.

Can you explain?

Regards,     Martin.



#-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-#  http://www.sw.it.aoyama.ac.jp       mailto:duerst@it.aoyama.ac.jp     
Received on Monday, 25 August 2008 08:53:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:18 GMT