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

Re: html5 syntax - why not use xml syntax?

From: Thomas Broyer <t.broyer@gmail.com>
Date: Fri, 6 Jul 2007 17:14:00 +0200
Message-ID: <a9699fd20707060814s311be033i91c6e301b25b3251@mail.gmail.com>
To: public-html@w3.org

2007/7/6, Mynthon:
> Why isn't html5 using xml syntax?

Because otherwise it would have been XHTML 1.2 ?
...and this WG wouldn't have had any reason to exist at all (there's a
WG for XHTML 2).

> look at this example:
> 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).

Use a tagsoup parser (e.g. Tidy) or an HTML5 parser (e.g. html5lib) to
aprse the HTML and reserialize it as XML.

> 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.

I don't understand the difference. If browsers don't enforce XML
wellformedness when parsing documents (and they won't), authors will
continue to produce non-XML documents.

In short: HTML is not XHTML. If you want XHTML, use a "converter".

Thomas Broyer
Received on Friday, 6 July 2007 15:14:05 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:23 UTC