Re: html5 syntax - why not use xml syntax?

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