W3C home > Mailing lists > Public > www-tag@w3.org > February 2009

Re: HTML and XML

From: Elliotte Harold <elharo@metalab.unc.edu>
Date: Wed, 11 Feb 2009 06:47:11 -0800
Message-ID: <4992E4EF.3090902@metalab.unc.edu>
To: Julian Reschke <julian.reschke@gmx.de>
Cc: "Michael(tm) Smith" <mike@w3.org>, "Henry S. Thompson" <ht@inf.ed.ac.uk>, Anne van Kesteren <annevk@opera.com>, David Orchard <orchard@pacificspirit.com>, Henri Sivonen <hsivonen@iki.fi>, www-tag@w3.org

Julian Reschke wrote:
> Elliotte Rusty Harold wrote:
>> ...
>> On this point, I have to call B.S. again. That a document is served as 
>> text/html does not make it HTML. Much less does it make it not XML. If 
>> a document satisfies the BNF grammar and the various well-formedness 
>> constraints, it is XML, whatever you call it. It may also be HTML, and 
>> perhaps other things as well.
>> ...
> 
> Depends on whether you concentrate on the octet sequence alone, or add 
> metadata, as served by HTTP. In the latter case it's certainly *not* BS.


It absolutely is B.S. Were I to serve an XML document as image/jpeg 
would that make it a JPEG? Of course not. Were I to serve a JPEG as 
text/html would that make it not a JPEG? of course not. This is obvious. 
  HTML and XML just happen to be close enought hat this point is 
sometimes obscured because some things really can be both, and because 
browsers often deliberately obscure there processing model.


>> The MIME type is not normative. That someone has labeled a document as 
>> one thing or another does not make it that thing.
> 
> It totally is. By sending XHTML as text/html I'm asking the recipient to 
> handle the document as text/html.

"Please handle this document as X" and "This document is an X" are very 
different statements. Furthermore, it is essential to realize that 
browsers and other consumers are not obligated to accept suggestions 
about handling from the server. They can and do treat any document they 
receive in the way that makes most sense to them.

A lot of the electrons spilled on this topic are based on the fantasy 
that servers can somehow impose required processing or understanding on 
a client. They can't. Servers may suggest and offer hints, but they 
cannot demand. Clients will do what makes the most sense for the client. 
Sometimes that's what the server expects them to do. Sometimes it isn't.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
Received on Wednesday, 11 February 2009 14:47:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:48:12 GMT