W3C home > Mailing lists > Public > public-html@w3.org > January 2009

Re: ISSUE-54: doctype-legacy-compat

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 26 Jan 2009 03:00:26 +0000 (UTC)
To: Sam Ruby <rubys@intertwingly.net>
Cc: Henri Sivonen <hsivonen@iki.fi>, HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0901260253590.952@hixie.dreamhostps.com>

On Sun, 25 Jan 2009, Sam Ruby wrote:
> Again, it is worth repeating that Venus produces a file.  Whether that 
> file is later served as text/html or as application/xhtml+xml is 
> something the person who uses Venus decides.

XML and text/html have differences that go far beyond mere syntax. When 
you produce XML or text/html, you need to know which it is so that you can 
output the right markup. The way nodes are exposed in the DOM, CSS rules 
around the <body> and <tbody> elements, features like <noscript>, all 
depend whether the document is XML or text/html.

It's possible to output a polyglot document that is valid both as XHTML5 
in XML and HTML5 in text/html, but it requires care and discipline. (If 
anything, this should be considered a third language and API set, stricter 
than either of the other two.) One of the rules for making polyglot 
documents is that one must output <!DOCTYPE HTML>, which is allowed in 
both. (Other rules include being careful about using the /> form, being 
careful about namespace declarations, being careful about xml:lang/lang, 
being careful with script and CSS, etc.)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 26 January 2009 03:01:07 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:41 UTC