Re: Why HTML should be taught as HTML without pretending it is XML

On 7/21/07, Robert Burns <rob@robburns.com> wrote:

>
> It may not be a popularity  contest, but it is a relatively well-
> beaten cowpath. By cowpath principle, authors are demonstrating that
> an HTML syntax (and implementation enhancements) that allows writing
> once and deploying either as XML or as text/html is desirable.

If anything, authors are demonstrating that they think that they *are*
using XML, even though they're serving it as text/html.  There is an
astounding number of authors who write HTML for money and don't know
the difference.  I used to be one of them.

They are not demonstrating that they know the difference, but like to
switch back and forth. There are better tools for that, if an author
actually knows what he is doing and wants to do that.

Henri pointed out some differences other than syntactic differences
that authors won't catch on to.  There are plenty others including
parsing rules, DOM functions and more.

> So I would say that the XHTML1-appendix C-like syntax is one of those
> cowpaths we should be considering even if we aren't just trying to
> judge a popularity contest.

Appendix C is one of the reasons we now have the problem of HTML pages
pretending to be XML, and why authors would be royally confused if
they ever tried to actually serve those pages as XML.

So, as I take it, your reason for wanting to encourage XML-like syntax
is to smooth the conversion of an HTML document to an XHTML document.
I contend that is a bad reason because it will encourage confusion
between the differences between the two.  There are useful tools out
there to convert the syntax.  Even after converting syntax, authors
still have to contend with differences in available DOM methods,
content models, parsing rules, and server configuration.

-- 
Jon Barnett

Received on Monday, 23 July 2007 13:30:48 UTC