diff --git a/includes/common.inc b/includes/common.inc
index d64be82..87ee45e 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -249,25 +249,9 @@ function drupal_get_breadcrumb() {
 }
 
 /**
- * Returns a string containing RDF namespace declarations for use in XML and
- * XHTML output.
- */
-function drupal_get_rdf_namespaces() {
-  $xml_rdf_namespaces = array();
-
-  // Serializes the RDF namespaces in XML namespace syntax.
-  if (function_exists('rdf_get_namespaces')) {
-    foreach (rdf_get_namespaces() as $prefix => $uri) {
-      $xml_rdf_namespaces[] = 'xmlns:' . $prefix . '="' . $uri . '"';
-    }
-  }
-  return count($xml_rdf_namespaces) ? "\n  " . implode("\n  ", $xml_rdf_namespaces) : '';
-}
-
-/**
  * Add output to the head tag of the HTML page.
  *
- * This function can be called as long the headers aren't sent. Pass no
+ * This function can be called as long as the headers aren't sent. Pass no
  * arguments (or NULL for both) to retrieve the currently stored elements.
  *
  * @param $data
diff --git a/includes/theme.inc b/includes/theme.inc
index bea87c0..8bf6098 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2291,7 +2291,8 @@ function template_process(&$variables, $hook) {
   // Flatten out classes.
   $variables['classes'] = implode(' ', $variables['classes_array']);
 
-  // Flatten out attributes, title_attributes, and content_attributes.
+  // Flatten out attributes, head_attributes, title_attributes, and
+  // content_attributes.
   // Because this function can be called very often, and often with empty
   // attributes, optimize performance by only calling drupal_attributes() if
   // necessary.
@@ -2345,13 +2346,12 @@ function template_preprocess_html(&$variables) {
     $variables['classes_array'][] = drupal_html_class('node-type-' . $node->type);
   }
 
-  // RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides
-  // mechanisms for extraction of this RDF content via XSLT transformation
-  // using an associated GRDDL profile.
-  $variables['rdf_namespaces']    = drupal_get_rdf_namespaces();
-  $variables['grddl_profile']     = 'http://www.w3.org/1999/xhtml/vocab';
-  $variables['language']          = $GLOBALS['language'];
-  $variables['language']->dir     = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
+  // HTML element attributes.
+  $variables['attributes_array'] = array(
+    'xmlns' => "http://www.w3.org/1999/xhtml",
+    'xml:lang' => $GLOBALS['language']->language,
+    'dir' => $GLOBALS['language']->direction ? 'rtl' : 'ltr',
+  );
 
   // Add favicon.
   if (theme_get_setting('toggle_favicon')) {
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module
index ebecd42..4546db6 100644
--- a/modules/rdf/rdf.module
+++ b/modules/rdf/rdf.module
@@ -267,8 +267,8 @@ function rdf_mapping_delete($type, $bundle) {
  * Builds an array of RDFa attributes for a given mapping. This array will
  * typically be passed through drupal_attributes() to create the attributes
  * variables that are available to template files. These include $attributes,
- * $title_attributes, $content_attributes and the field-specific
- * $item_attributes variables. For more information, see
+ * $head_attributes, $title_attributes, $content_attributes and the
+ * field-specific $item_attributes variables. For more information, see
  * theme_rdf_template_variable_wrapper().
  *
  * @param $mapping
@@ -428,10 +428,10 @@ function rdf_theme() {
  * Template process function for adding extra tags to hold RDFa attributes.
  *
  * Since template files already have built-in support for $attributes,
- * $title_attributes, and $content_attributes, and field templates have support
- * for $item_attributes, we try to leverage those as much as possible. However,
- * in some cases additional attributes are needed not covered by these. We deal
- * with those here.
+ * $head_attributes, $title_attributes, and $content_attributes, and field
+ * templates have support for $item_attributes, we try to leverage those as much
+ * as possible. However, in some cases additional attributes are needed not
+ * covered by these. We deal with those here.
  */
 function rdf_process(&$variables, $hook) {
   // Handles attributes needed for content not covered by title, content,
@@ -461,6 +461,19 @@ function rdf_process(&$variables, $hook) {
 }
 
 /**
+ * Implements MODULE_preprocess_HOOK()
+ */
+function rdf_preprocess_html(&$variables) {
+  // Adds RDF namespace prefix bindings in the form of an RDFa 1.1 prefix
+  // attribute inside the html element.
+  $prefixes = array();
+  foreach(rdf_get_namespaces() as $prefix => $uri) {
+    $prefixes[] = $prefix . ': ' . $uri;
+  }
+  $variables['attributes_array']['prefix'] = implode("\n", $prefixes);
+}
+
+/**
  * Implements MODULE_preprocess_HOOK().
  */
 function rdf_preprocess_node(&$variables) {
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test
index 7586235..50177ca 100644
--- a/modules/rdf/rdf.test
+++ b/modules/rdf/rdf.test
@@ -713,3 +713,48 @@ class RdfGetRdfNamespacesTestCase extends DrupalWebTestCase {
     $this->assertTrue(!isset($ns['dc']), t('A prefix with conflicting namespaces is discarded.'));
   }
 }
+
+/**
+ * Tests for RDF namespaces XML serialization.
+ */
+class DrupalGetRdfNamespacesTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'RDF namespaces serialization test',
+      'description' => 'Confirm that the serialization of RDF namespaces in present in the HTML markup.',
+      'group' => 'RDF',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('rdf', 'rdf_test');
+  }
+
+  /**
+   * Test RDF namespaces.
+   */
+  function testGetRdfNamespaces() {
+    // Fetches the front page and extracts RDFa 1.1 prefixes.
+    $this->drupalGet('');
+
+    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', array(
+      ':prefix_binding' => 'rdfs: http://www.w3.org/2000/01/rdf-schema#',
+    ));
+    $this->assertTrue(!empty($element), t('A prefix declared once is displayed.'));
+
+    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', array(
+      ':prefix_binding' => 'foaf: http://xmlns.com/foaf/0.1/',
+    ));
+    $this->assertTrue(!empty($element), t('The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'));
+
+    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', array(
+      ':prefix_binding' => 'foaf1: http://xmlns.com/foaf/0.1/',
+    ));
+    $this->assertTrue(!empty($element), t('Two prefixes can be assigned the same namespace.'));
+
+    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', array(
+      ':prefix_binding' => 'dc: ',
+    ));
+    $this->assertTrue(empty($element), t('A prefix with conflicting namespaces is discarded.'));
+  }
+}
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 021e721..b4c7479 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -2385,38 +2385,6 @@ class DrupalJSONTest extends DrupalUnitTestCase {
 }
 
 /**
- * Tests for RDF namespaces XML serialization.
- */
-class DrupalGetRdfNamespacesTestCase extends DrupalWebTestCase {
-  public static function getInfo() {
-    return array(
-      'name' => 'RDF namespaces XML serialization tests',
-      'description' => 'Confirm that the serialization of RDF namespaces via drupal_get_rdf_namespaces() is output and parsed correctly in the XHTML document.',
-      'group' => 'System',
-    );
-  }
-
-  function setUp() {
-    parent::setUp('rdf', 'rdf_test');
-  }
-
-  /**
-   * Test RDF namespaces.
-   */
-  function testGetRdfNamespaces() {
-    // Fetches the front page and extracts XML namespaces.
-    $this->drupalGet('');
-    $xml = new SimpleXMLElement($this->content);
-    $ns = $xml->getDocNamespaces();
-
-    $this->assertEqual($ns['rdfs'], 'http://www.w3.org/2000/01/rdf-schema#', t('A prefix declared once is displayed.'));
-    $this->assertEqual($ns['foaf'], 'http://xmlns.com/foaf/0.1/', t('The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'));
-    $this->assertEqual($ns['foaf1'], 'http://xmlns.com/foaf/0.1/', t('Two prefixes can be assigned the same namespace.'));
-    $this->assertTrue(!isset($ns['dc']), t('A prefix with conflicting namespaces is discarded.'));
-  }
-}
-
-/**
  * Basic tests for drupal_add_feed().
  */
 class DrupalAddFeedTestCase extends DrupalWebTestCase {
diff --git a/modules/system/html.tpl.php b/modules/system/html.tpl.php
index 0e01277..7f8c8f9 100644
--- a/modules/system/html.tpl.php
+++ b/modules/system/html.tpl.php
@@ -9,7 +9,8 @@
  * - $css: An array of CSS files for the current page.
  * - $language: (object) The language the site is being displayed in.
  *   $language->language contains its textual representation.
- *   $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
+ *   $language->dir contains the language direction.
+ *   It will either be 'ltr' or 'rtl'.
  * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document.
  * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data.
  * - $head_title: A modified version of the page title, for use in the TITLE
@@ -40,22 +41,20 @@
  * @see template_preprocess_html()
  * @see template_process()
  */
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
-  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>"<?php print $rdf_namespaces; ?>>
-
-<head profile="<?php print $grddl_profile; ?>">
-  <?php print $head; ?>
-  <title><?php print $head_title; ?></title>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-</head>
-<body class="<?php print $classes; ?>" <?php print $attributes;?>>
-  <div id="skip-link">
-    <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
-  </div>
-  <?php print $page_top; ?>
-  <?php print $page; ?>
-  <?php print $page_bottom; ?>
-</body>
+?><!DOCTYPE html>
+<html<?php print $attributes; ?>>
+  <head>
+    <?php print $head; ?>
+    <title><?php print $head_title; ?></title>
+    <?php print $styles; ?>
+    <?php print $scripts; ?>
+  </head>
+  <body class="<?php print $classes; ?>" <?php print $content_attributes;?>>
+    <div id="skip-link">
+      <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
+    </div>
+    <?php print $page_top; ?>
+    <?php print $page; ?>
+    <?php print $page_bottom; ?>
+  </body>
 </html>
