diff -ur wordpress/wp-blog-header.php wordpress.xhtml/wp-blog-header.php
--- wordpress/wp-blog-header.php	Thu May  5 23:05:51 2005
+++ wordpress.xhtml/wp-blog-header.php	Tue May 10 23:00:22 2005
@@ -106,6 +106,51 @@
 	}
 }
 
+if(     (strstr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) ||
+	(strstr($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator')) ||
+	(strstr($_SERVER['HTTP_USER_AGENT'], 'WDG_Validator')) )	{
+	//
+	// If any of the conditions match and a mediatype via GET is not set, set the appropiate media type
+	$media_type_get = (!isset($_GET['mediatype'])) ? 'xhtml' : $_GET['mediatype'];
+}
+
+switch ($media_type_get) {
+	//
+	// For our lovely XHTML
+	case 'xhtml':
+		$http_media_type = 'application/xhtml+xml';
+		break;
+	//
+	// For generic XML, or fancy mixed mode XML documents
+	case 'xml':
+	case 'axml':
+	case 'xsl':
+	case 'xslt':
+		$http_media_type = 'application/xml';
+		break;
+	//
+	// This is depreciated and has Unicode handling problems but what the hell
+	case 'txml':
+		$http_media_type = 'text/xml';
+		break;
+	//
+	// The proposed MIME type for the XSLT2 spec
+	case 'xslt2':
+		$http_media_type = 'application/xslt+xml';
+		break;
+	//
+	// This is funny for jokes :D
+	case 'text':
+		$http_media_type = 'text/plain';
+		break;
+	//
+	// Boring old HTML for stupid browsers
+	case 'html':
+	default:
+		$http_media_type = 'text/html';
+		break;
+}
+
 // Sending HTTP headers
 
 if ( !empty($error) && '404' == $error ) {
@@ -115,7 +160,7 @@
 		@header('HTTP/1.x 404 Not Found');
  } else if ( empty($feed) ) {
 	@header('X-Pingback: '. get_bloginfo('pingback_url'));
-	@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+	@header('Content-type: ' . get_bloginfo('http_media_type') . '; charset=' . get_option('blog_charset'));
 } else {
 	// We're showing a feed, so WP is indeed the only thing that last changed
 	if ( $withcomments )
diff -ur wordpress/wp-content/themes/classic/header.php wordpress.xhtml/wp-content/themes/classic/header.php
--- wordpress/wp-content/themes/classic/header.php	Mon Feb 14 04:36:57 2005
+++ wordpress.xhtml/wp-content/themes/classic/header.php	Tue May 10 23:39:15 2005
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 
 <head profile="http://gmpg.org/xfn/11">
-	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Type" content="<?php bloginfo('http_media_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
 
 	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
 	
@@ -27,4 +27,4 @@
 <h1 id="header"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
 
 <div id="content">
-<!-- end header -->
\ No newline at end of file
+<!-- end header -->
diff -ur wordpress/wp-content/themes/default/header.php wordpress.xhtml/wp-content/themes/default/header.php
--- wordpress/wp-content/themes/default/header.php	Fri Mar 11 23:56:29 2005
+++ wordpress.xhtml/wp-content/themes/default/header.php	Tue May 10 23:08:11 2005
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 
 <head profile="http://gmpg.org/xfn/11">
-	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Type" content="<?php bloginfo('http_media_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
 
 	<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
 	
@@ -21,7 +21,7 @@
 				and not in the wp-layout.css file. If you prefer to use only CSS for colors and what
 				not, then go right ahead and delete the following lines, and the image files. */
 			
-		body	 	{ background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgcolor.jpg"); }	<?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! is_single())) { ?>
+		html	 	{ background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgcolor.jpg"); }	<?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! is_single())) { ?>
 			#page		{ background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; } <?php } else { // No sidebar ?>
 			#page		{ background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; } <?php } ?>
 			#header 	{ background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickheader.jpg") no-repeat bottom center; }
diff -ur wordpress/wp-content/themes/default/style.css wordpress.xhtml/wp-content/themes/default/style.css
--- wordpress/wp-content/themes/default/style.css	Fri Feb 11 07:48:30 2005
+++ wordpress.xhtml/wp-content/themes/default/style.css	Tue May 10 23:28:51 2005
@@ -1,7 +1,7 @@
 /*  
 Theme Name: WordPress Default
 Theme URI: http://wordpress.org/
-Description: The default WordPress theme based on the famous <a href="http://binarybonsai.com/kubrick/">Kubrick</a>.
+Description: The default WordPress theme based on the famous <a href="http://binarybonsai.com/kubrick/">Kubrick</a>.<br />"application/xhtml+xml" compliance was done by <a href="http://lambcutlet.org/">Jonathan Stanley</a>.
 Version: 1.5
 Author: Michael Heilemann
 Author URI: http://binarybonsai.com/
@@ -21,12 +21,19 @@
 	This is to ease installation inside subdirectories of a server.
 
 	Have fun, and don't be afraid to contact me if you have questions.
+
+	*** REGARDING application/xhtml+xml FIXES ***
+	The trivial changes were done by Jonathan Stanley, just bare in mind that
+	<html> is your XHTML canvas, as opposed to <body> in boring old HTML...
+	GPL is again the order of the day, as GPL says so plus biting the hand that feeds
+	you is never a good idea! Jonathan's blog can be found at http://lambcutlet.org/
+
 */
 
 
 
 /* Begin Typography & Colors */
-body {
+html {
 	font-size: 62.5%; /* Resets 1em to 10px */
 	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
 	background-color: #d5d6d7;
@@ -207,7 +214,7 @@
 
 
 /* Begin Structure */
-body {
+html, body {
 	margin: 0;
 	padding: 0; 
 	}
diff -ur wordpress/wp-includes/template-functions-general.php wordpress.xhtml/wp-includes/template-functions-general.php
--- wordpress/wp-includes/template-functions-general.php	Sun Apr  3 17:38:41 2005
+++ wordpress.xhtml/wp-includes/template-functions-general.php	Tue May 10 22:56:58 2005
@@ -115,6 +115,10 @@
 	case 'html_type' :
 		$output = get_option('html_type');
 		break;
+	case 'http_media_type':
+		global $http_media_type;
+		$output = $http_media_type;
+		break;
 	case 'version':
 		global $wp_version;
 		$output = $wp_version;
