Re: html5 syntax - why not use xml syntax?

Mynthon writes:

> As i understand not-closed tag and values without " or ' are allowed
> in html5.

Yes.  As with all previous non-XHTML versions of HTML.

> It is probably because of backward compatibility but imo it is not
> good idea.

You don't think backwards compatibility is a good idea?  You don't want
HTML5 web browsers to be able to parse lots of existing HTML content?

Even ignoring that issue (which could be done by specifying how parsers
deal with optional closing tags while still branding content written
without them as non-conforming), going forwards much of the HTML that is
written, especially that written by hand, is going to be missing closing
tags.

Writing well-formed XML by hand is tricky.  Given that browsers are
going to have to parse traditional-style HTML anyway, letting authors
use the simpler, more permissive, syntax makes their lives easier.

It also increases the amount of valid HTML out there; the lower the
restrictions on what is valid HTML, the more of the HTML that's written
will be valid.

> But there is very big problem in exchanging informations between html
> and xml formats (or parsing html fragments).

That's only a problem for those who wish to do that.  Many HTML
documents go nowhere near any XML documents, XML editors, or XML
processors.  Many people want nothing at all to do with XML.  Why should
the lives of those who just want to create webpages and who don't use
XML be made harder?

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

Yes.  But that is only one scenario.  Fortunately HTML5 allows both;
those with requirements like the above can choose the XML variant; and
those who prefer the relaxed syntax can use that.

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

Who is "THEY"?  Do you mean "all authors" or "some authors"?

Given this choice, some people will surely choose each syntax.  The XML
users can choose XML; why is some other people not doing that a problem?

> Forcing html-users to write xml compatible code will be very big step
> forward.

Why?  You're writing as though it's a universal truth that XML is better
than non-XML.  Is that a design principle of this group?

Smylers

Received on Friday, 6 July 2007 15:35:14 UTC