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

Hi Lachlan,

On Jul 21, 2007, at 7:34 PM, Lachlan Hunt wrote:

>
> Terry Morris wrote:
>> At this point I believe it is up to the W3C to follow this  
>> groundswell push
>> for standards and stricter coding. I've been personally dismayed  
>> by the
>> posts on this list suggesting that old-style coding will be  
>> preferred in
>> HTML5.
>
> I don't believe anyone has been suggesting that "old-style coding"  
> is preferred.  It's a choice.  Some authors may prefer to close all  
> elements, quote all attributes, etc.  Others may prefer not to.   
> The spec does not endorse one set of coding conventions over another.
>
> On the other hand, some people seem to be promoting that idea that  
> requiring end tags, always quoting attributes, using lowercase tag  
> names, etc. is somehow a superior convention that should be pushed  
> upon everyone.  Some even presented evidence of the conventions  
> that some popular authors adhere to, with the assumption that their  
> choices are automatically better than others.
>
> Well, it's not a popularity contest.

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. This  
does not mean that we should require all authors to author in this  
way (that's not what the cowpath principle says to me anyway).  
However, it does mean things like: 1) showing authors what syntax and  
conventions to use to accomplish this; and 2) ensuring, as much as  
possible, that HTML has a DOM that works consistently regardless of  
syntax.

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.

I think the desire to have a single syntax that works as either  
serialization is really what's being expressed here. It is not an  
issue of strictness of syntax since each of these syntaxes has their  
own strictness (xml requires closing elements; text/html forbids  
closing certain elements). It isn't just a desire to switch to XML  
(though that may be a big part of it), since authors want to use this  
syntax even with text/html, because it is easier to teach and it is  
easier to code in a well-formed manner. Authors do also want to be  
ready for a day when the UA implementations finally catch up to the  
authors (as expressed by this cowpath). They look forward to a day  
where every new namespace does not have to wait for the next rev of  
HTML to interoperabely incorporate it into HTML. Many implementations  
are on the verge of reaching maturity in their XML/XHTML handling.   
And IE has had decent XML handling since version 5.0 If it wanted to  
turn on proper handling for <title>, <a>, <script>, <style> and  
<link>  elements (and HTML named character entities), it would also  
have decent XHTML handling.

However, leaving IE aside (since we cannot glean any trends with IE,  
but more and more authors will be ale to leave IE aside), XHTML is on  
the verge of becoming a superior way to deploy HTML content for some  
authors and in some environments. That's something we should keep in  
mind and should try to facilitate.

Take care,
Rob

Received on Sunday, 22 July 2007 01:04:21 UTC