[whatwg] several messages about XML syntax and HTML5

Le Mon, 04 Dec 2006 18:10:18 +0200, Michel Fortin  
<michel.fortin at michelf.com> a ?crit:

> Le 4 d?c. 2006 ? 6:10, Mihai Sucan a ?crit :
>
>> However, in the same "spirit", a middle way for those who want XMLiness  
>> in HTML, would be to allow the xmlns:?.* attribute, xml:base, xml:id,  
>> and xml:lang. Yet, define them as meaningless. Just for validation  
>> purposes, just for helping people who do such things on the server-side.
>
> I disagree. I think xmlns="http://www.w3.org/1999/html" is fine in HTML  
> because it just states what is already implied. But I think allowing  
> attributes with no meaning to validate will just reenforce the idea that  
> they are meaningful. If you use them, fine, but you'll have a validation  
> error there that will warn you that this is no HTML.
>
> I know I suggested xml:lang before, but that was when I thought it was  
> parsed in HTML. Now I think a more clever approach would be to allow  
> html:lang to validate in XHTML, because XHTML already mandates that  
> html:lang be taken into account when determining the language.

Doesn't html:lang validate in XHTML? If not, this is news to me.

IMHO, it should validate. Why so? It's said that the HTML5 and XHTML5 are  
one and the same language, with different serialization (HTML and XML,  
hence different parsers must be used). The following code should be valid  
in XHTML5 and HTML5:

<html lang="fr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sans titre</title>
</head>
<body>
<p>Bonjour ? tous!</p>
<p lang="ro">Bun? ziua tuturor!</p>
<p><img src="merci.png" alt="Merci!" id="mon-image" /></p>
</body>
</html>

(apologies if mistakes in code, I am in a hurry)

> As for xml:id, why not use "id" purely and simply? It works with both  
> HTML and XHTML anyway.

As I have said, I am not a supporter of allowing attributes just for the  
sake of validation. I was just providing a "middle" suggestion, which  
could satisfy some who want XMLiness.

Hence, I wish good luck to Hixie with saying "no" to some requests.


-- 
http://www.robodesign.ro
ROBO Design - We bring you the future

Received on Monday, 4 December 2006 09:30:20 UTC