Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.827
diff -u -p -r1.827 common.inc
--- includes/common.inc	16 Nov 2008 19:41:14 -0000	1.827
+++ includes/common.inc	18 Nov 2008 18:24:53 -0000
@@ -113,6 +113,18 @@ function drupal_get_breadcrumb() {
 }
 
 /**
+ * Returns a string containing RDF namespaces for the html tag of a XHTML page.
+ */
+function drupal_get_rdf_namespaces() {
+  // Serialize the RDF namespaces used in RDFa annotation.
+  $xml_rdf_namespaces = array();
+  foreach (module_invoke_all('rdf_namespaces') as $prefix => $uri) {
+    $xml_rdf_namespaces[] = 'xmlns:' . $prefix . '="' . $uri . '"';
+  }
+  return 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.
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.450
diff -u -p -r1.450 theme.inc
--- includes/theme.inc	10 Nov 2008 15:40:03 -0000	1.450
+++ includes/theme.inc	18 Nov 2008 18:24:53 -0000
@@ -1882,6 +1882,11 @@ function template_preprocess_page(&$vari
   $variables['scripts']           = drupal_get_js();
   $variables['tabs']              = theme('menu_local_tasks');
   $variables['title']             = drupal_get_title();
+  // RDFa annotatates XHTML 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://ns.inria.fr/grddl/rdfa/';
   // Closure should be filled last.
   $variables['closure']           = theme('closure');
 
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.638
diff -u -p -r1.638 system.module
--- modules/system/system.module	15 Nov 2008 08:23:07 -0000	1.638
+++ modules/system/system.module	18 Nov 2008 18:24:54 -0000
@@ -196,6 +196,26 @@ function system_perm() {
 }
 
 /**
+ * Implementation of hook_rdf_namespace().
+ */
+function system_rdf_namespaces() {
+  return array(
+    'admin'    => 'http://webns.net/mvcb/',
+    'content'  => 'http://purl.org/rss/1.0/modules/content/',
+    'dc'       => 'http://purl.org/dc/elements/1.1/',
+    'dcterms'  => 'http://purl.org/dc/terms/',
+    'foaf'     => 'http://xmlns.com/foaf/0.1/',
+    'owl'      => 'http://www.w3.org/2002/07/owl#',
+    'rdf'      => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
+    'rdfs'     => 'http://www.w3.org/2000/01/rdf-schema#',
+    'rss'      => 'http://purl.org/rss/1.0/',
+    'sioc'     => 'http://rdfs.org/sioc/ns#',
+    'xsi'      => 'http://www.w3.org/2001/XMLSchema-instance#',
+    'xsd'      => 'http://www.w3.org/2001/XMLSchema#',
+  );
+}
+
+/**
  * Implementation of hook_elements().
  */
 function system_elements() {
Index: themes/bluemarine/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v
retrieving revision 1.30
diff -u -p -r1.30 page.tpl.php
--- themes/bluemarine/page.tpl.php	25 Jun 2008 09:12:25 -0000	1.30
+++ themes/bluemarine/page.tpl.php	18 Nov 2008 18:24:54 -0000
@@ -1,9 +1,9 @@
 <?php
 // $Id: page.tpl.php,v 1.30 2008/06/25 09:12:25 dries Exp $
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
-
-<head>
+?><!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 ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>"
+  <?php print $rdf_namespaces ?>>
+<head profile="<?php print $grddl_profile ?>">
   <title><?php print $head_title ?></title>
   <?php print $head ?>
   <?php print $styles ?>
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.78
diff -u -p -r1.78 chameleon.theme
--- themes/chameleon/chameleon.theme	25 Jun 2008 09:12:25 -0000	1.78
+++ themes/chameleon/chameleon.theme	18 Nov 2008 18:24:54 -0000
@@ -22,14 +22,16 @@ function chameleon_page($content, $show_
   }
 
   $title = drupal_get_title();
+  $rdf_namespaces = drupal_get_rdf_namespaces();
 
   // Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.)
   $blocks_left = theme_blocks('left');
   $blocks_right = theme_blocks('right');
 
-  $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
-  $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\" dir=\"$direction\">\n";
-  $output .= "<head>\n";
+  $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML+RDFa 1.0//EN\" \"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd\">\n";
+  $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\" dir=\"$direction\"\n";
+  $putput .= "  $rdf_namespaces>\n";
+  $output .= "<head profile=\"http://ns.inria.fr/grddl/rdfa/\">\n";
   $output .= " <title>" . ($title ? strip_tags($title) . " | " . variable_get("site_name", "Drupal") : variable_get("site_name", "Drupal") . " | " . variable_get("site_slogan", "")) . "</title>\n";
   $output .= drupal_get_html_head();
   $output .= drupal_get_css();
Index: themes/garland/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/page.tpl.php,v
retrieving revision 1.21
diff -u -p -r1.21 page.tpl.php
--- themes/garland/page.tpl.php	14 Sep 2008 02:03:35 -0000	1.21
+++ themes/garland/page.tpl.php	18 Nov 2008 18:24:54 -0000
@@ -1,9 +1,10 @@
 <?php
 // $Id: page.tpl.php,v 1.21 2008/09/14 02:03:35 webchick Exp $
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
-  <head>
+?><!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 ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>"
+  <?php print $rdf_namespaces ?>>
+  <head profile="<?php print $grddl_profile ?>">
     <title><?php print $head_title ?></title>
     <?php print $head ?>
     <?php print $styles ?>
Index: themes/pushbutton/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/pushbutton/page.tpl.php,v
retrieving revision 1.27
diff -u -p -r1.27 page.tpl.php
--- themes/pushbutton/page.tpl.php	28 Sep 2008 23:26:27 -0000	1.27
+++ themes/pushbutton/page.tpl.php	18 Nov 2008 18:24:54 -0000
@@ -1,8 +1,9 @@
 <?php
 // $Id: page.tpl.php,v 1.27 2008/09/28 23:26:27 dries Exp $
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
-<head>
+?><!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 ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>"
+  <?php print $rdf_namespaces ?>>
+<head profile="<?php print $grddl_profile ?>">
   <title><?php print $head_title ?></title>
   <meta http-equiv="Content-Style-Type" content="text/css" />
   <?php print $head ?>
