W3C home > Mailing lists > Public > www-html@w3.org > September 2000

Re: Sniffing XHTML sent as text/html

From: Ian Graham <igraham@smaug.java.utoronto.ca>
Date: Fri, 15 Sep 2000 18:42:56 -0400
To: Dan Connolly <connolly@w3.org>
cc: Steven Pemberton <steven.pemberton@cwi.nl>, "L. David Baron" <dbaron@fas.harvard.edu>, www-html@w3.org
Message-ID: <Pine.SGI.4.05.10009151836320.53962-100000@smaug.java.utoronto.ca>

On Wed, 13 Sep 2000, Dan Connolly wrote:

> > There should be no
> > sniffing of text/html documents to see if they are really XHTML.
> I don't know what you mean by "sniffing"; it is a simple
> computation to distinguish conforming XHTML documents
> from conforming HTML 4.01, HTML 4.0, HTML 3.2, and HTML 2.0
> documents: the latter begin with doctype declarations with
> well-known FPIs and URIs, e.g.:
>                      "http://www.w3.org/TR/html4/strict.dtd">
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>                      "http://www.w3.org/TR/html4/loose.dtd">

I believe that this is exactly what they mean by sniffing -- read the
start of the incoming text/html data and use the data there to determine
whether it is 'really' HTML (or rather the mess of tags that people
generally call HTML) or XML (XHTML), and the pass the data on acordingly.  
I tend to think that such sniffing, even if it works, is more confusing to
developers than helpful, since it is just one more way for things to go
wrong in a hard to detect way.  

Ian Graham ................................... ian.graham@utoronto.ca
......................................... http://www.utoronto.ca/ian/
Received on Friday, 15 September 2000 18:43:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:54 UTC