W3C home > Mailing lists > Public > public-html@w3.org > July 2007

html5 syntax - why not use xml syntax?

From: Mynthon <mynthon1@gmail.com>
Date: Fri, 6 Jul 2007 14:01:41 +0200
Message-ID: <2abc5f2d0707060501m50a3972aga3945b8cd3b1f3a8@mail.gmail.com>
To: public-html@w3.org

Why isn't html5 using xml syntax? Look at
http://www.w3.org/html/wg/html5/diff/ and you find those examples:

<dialog>
 <dt> Costello
 <dd> Look, you gotta first baseman?
 <dt> Abbott
 <dd> Certainly.
 <dt> Costello
 <dd> Who's playing first?
 <dt> Abbott
 <dd> That's right.
 <dt> Costello
 <dd> When you pay off the first baseman every month, who gets the money?
 <dt> Abbott
 <dd> Every dollar of it.
</dialog>

<figure>
 <video src=ogg></video>
 <legend>Example</legend>
</figure>

As i understand not-closed tag and values without " or ' are allowed
in html5. It is probably because of backward compatibility but imo it
is not good idea.

Browsers are now rendering <img .../> etc. very well (and IE even
doesnt support a/x+x) so backward compatibility is not a problem! But
there is very big problem in exchanging informations between html and
xml formats (or parsing html fragments).

look at this example:

<dialog>
 <dt> Costello
 <dd> Look, you gotta first baseman?
</dialog>

or

<img src="1.gif" alt="1" >
<img src="2.gif" alt="2" >
<img src="3.gif" alt="3" >
<img src="4.gif" alt="4" >
<img src="5.gif" alt="5" >

you cannot simply paste it into xml source (or use some kind of xml
parser) and then parse entire document, you have to close all tags
etc. When you have to put html code into bigger xml document it is
madness (not sparta).

Of couse you can say that people still can close tags etc. but i know
that THEY CAN != THEY WOULD.

Difference between html and xml should be in parsing not in syntax.
Forcing html-users to write xml compatible code will be very big step
forward.
Received on Friday, 6 July 2007 15:05:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:46 UTC