diff --git includes/theme.inc includes/theme.inc
index 8d3885e..a0e9337 100644
--- includes/theme.inc
+++ includes/theme.inc
@@ -2180,10 +2180,19 @@ function template_preprocess(&$variables, $hook) {
   $variables['id'] = $count[$hook]++;
 
   // Tell all templates where they are located.
-  $variables['directory'] = path_to_theme();
+  // Functions located anywhere other than in theme.inc should call
+  // path_to_theme() to get the theme path, instead of accessing the global
+  // variable directly. However, because this function resides within theme.inc,
+  // and therefore can be easily updated if the implementation of
+  // path_to_theme() changes, and because this function is called very often,
+  // we cheat in order to save the overhead of an extra function call.
+  global $theme_path;
+  $variables['directory'] = $theme_path;
 
   // Initialize html class attribute for the current hook.
-  $variables['classes_array'] = array(drupal_html_class($hook));
+  // drupal_html_class() is too slow, and we can assume that $hook is already
+  // lowercase, and has '_' as the only non-alphanumeric character.
+  $variables['classes_array'] = array(strtr($hook, '_', '-'));
 
   // Merge in variables that don't depend on hook and don't change during a
   // single page request.
diff --git modules/comment/comment.module modules/comment/comment.module
index 950d4a6..ebca22a 100644
--- modules/comment/comment.module
+++ modules/comment/comment.module
@@ -2510,7 +2510,7 @@ function comment_rdf_mapping() {
       'type' => 'comment',
       'bundle' => RDF_DEFAULT_BUNDLE,
       'mapping' => array(
-        'rdftype' => array('sioc:Post'),
+        'rdftype' => array('sioc:Post', 'sioct:Comment'),
         'title' => array(
           'predicates' => array('dc:title'),
         ),
@@ -2524,7 +2524,7 @@ function comment_rdf_mapping() {
           'datatype' => 'xsd:dateTime',
           'callback' => 'date_iso8601',
         ),
-        'body' => array(
+        'comment_body' => array(
           'predicates' => array('content:encoded'),
         ),
         'pid' => array(
diff --git modules/comment/comment.test modules/comment/comment.test
index 02be15b..5d5d7ca 100644
--- modules/comment/comment.test
+++ modules/comment/comment.test
@@ -1149,10 +1149,10 @@ class CommentRdfaTestCase extends CommentHelperCase {
     // Tests comment #2 as anonymous user.
     $this->_testBasicCommentRdfaMarkup($comment2, $anonymous_user);
     // Tests the RDFa markup for the homepage (specific to anonymous comments).
-    $comment_homepage = $this->xpath("//div[@typeof='sioc:Post']//span[@rel='sioc:has_creator']/a[contains(@class, 'username') and @typeof='sioc:User' and @property='foaf:name' and @href='http://example.org/' and contains(@rel, 'foaf:page')]");
+    $comment_homepage = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//span[@rel='sioc:has_creator']/a[contains(@class, 'username') and @typeof='sioc:User' and @property='foaf:name' and @href='http://example.org/' and contains(@rel, 'foaf:page')]");
     $this->assertTrue(!empty($comment_homepage), t('RDFa markup for the homepage of anonymous user found.'));
     // There should be no about attribute on anonymous comments.
-    $comment_homepage = $this->xpath("//div[@typeof='sioc:Post']//span[@rel='sioc:has_creator']/a[@about]");
+    $comment_homepage = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//span[@rel='sioc:has_creator']/a[@about]");
     $this->assertTrue(empty($comment_homepage), t('No about attribute is present on anonymous user comment.'));
 
     // Tests comment #2 as logged in user.
@@ -1160,10 +1160,10 @@ class CommentRdfaTestCase extends CommentHelperCase {
     $this->drupalGet('node/' . $this->node2->nid);
     $this->_testBasicCommentRdfaMarkup($comment2, $anonymous_user);
     // Tests the RDFa markup for the homepage (specific to anonymous comments).
-    $comment_homepage = $this->xpath("//div[@typeof='sioc:Post']//span[@rel='sioc:has_creator']/a[contains(@class, 'username') and @typeof='sioc:User' and @property='foaf:name' and @href='http://example.org/' and contains(@rel, 'foaf:page')]");
+    $comment_homepage = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//span[@rel='sioc:has_creator']/a[contains(@class, 'username') and @typeof='sioc:User' and @property='foaf:name' and @href='http://example.org/' and contains(@rel, 'foaf:page')]");
     $this->assertTrue(!empty($comment_homepage), t('RDFa markup for the homepage of anonymous user found.'));
     // There should be no about attribute on anonymous comments.
-    $comment_homepage = $this->xpath("//div[@typeof='sioc:Post']//span[@rel='sioc:has_creator']/a[@about]");
+    $comment_homepage = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//span[@rel='sioc:has_creator']/a[@about]");
     $this->assertTrue(empty($comment_homepage), t('No about attribute is present on anonymous user comment.'));
   }
 
@@ -1174,19 +1174,22 @@ class CommentRdfaTestCase extends CommentHelperCase {
    *
    * @param $comment
    *   Comment object.
-   * @param $acount
+   * @param $account
    *   An array containing information about an anonymous user.
    */
   function _testBasicCommentRdfaMarkup($comment, $account = array()) {
-    $comment_container = $this->xpath("//div[contains(@class, 'comment') and @typeof='sioc:Post']");
-    $this->assertTrue(!empty($comment_container));
-    $comment_title = $this->xpath("//div[@typeof='sioc:Post']//h3[@property='dc:title']");
-    $this->assertEqual((string)$comment_title[0]->a, $comment->subject);
-    $comment_date = $this->xpath("//div[@typeof='sioc:Post']//*[contains(@property, 'dc:date') and contains(@property, 'dc:created')]");
-    $this->assertTrue(!empty($comment_date));
+    $comment_container = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]");
+    $this->assertTrue(!empty($comment_container), t('Comment RDF type for comment found.'));
+    $comment_title = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//h3[@property='dc:title']");
+    $this->assertEqual((string)$comment_title[0]->a, $comment->subject, t('RDFa markup for the comment title found.'));
+    $comment_date = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//*[contains(@property, 'dc:date') and contains(@property, 'dc:created')]");
+    $this->assertTrue(!empty($comment_date), t('RDFa markup for the date of the comment found.'));
     // The author tag can be either a or span
-    $comment_author = $this->xpath("//div[@typeof='sioc:Post']//span[@rel='sioc:has_creator']/*[contains(@class, 'username') and @typeof='sioc:User' and @property='foaf:name']");
+    $comment_author = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//span[@rel='sioc:has_creator']/*[contains(@class, 'username') and @typeof='sioc:User' and @property='foaf:name']");
     $name = empty($account['name']) ? $this->web_user->name : $account['name'] . ' (not verified)';
-    $this->assertEqual((string)$comment_author[0], $name);
+    $this->assertEqual((string)$comment_author[0], $name, t('RDFa markup for the comment author found.'));
+    $comment_body = $this->xpath("//div[contains(@class, 'comment') and contains(@typeof, 'sioct:Comment')]//div[@class='content']//div[@class='comment-body' and @property='content:encoded']");
+    //var_dump($comment_body);
+    $this->assertEqual((string)$comment_body[0]->p, $comment->comment, t('RDFa markup for the comment body found.'));
   }
 }
diff --git modules/rdf/rdf.module modules/rdf/rdf.module
index 1c231f3..b7bd6ee 100644
--- modules/rdf/rdf.module
+++ modules/rdf/rdf.module
@@ -548,12 +548,10 @@ function rdf_preprocess_comment(&$variables) {
     $variables['title_attributes_array']['property'] = $comment->rdf_mapping['title']['predicates'];
     $variables['title_attributes_array']['datatype'] = '';
   }
-  if (!empty($comment->rdf_mapping['body'])) {
-    // We need a special case here since the comment body is not a field. Note
-    // that for that reason, fields attached to comment will be ignored by RDFa
-    // parsers since we set the property attribute here.
-    // @todo Use fields instead, see http://drupal.org/node/538164
-    $variables['content_attributes_array']['property'] = $comment->rdf_mapping['body']['predicates'];
+  if (!empty($comment->rdf_mapping['comment_body'])) {
+    // We need a special case here since the comment body is not a field.
+    $variables['content']['comment_body']['#prefix'] = '<div class="comment-body" ' . drupal_attributes(rdf_rdfa_attributes($comment->rdf_mapping['comment_body'])) . '>';
+    $variables['content']['comment_body']['#suffix'] = '</div>';
   }
 
   // Annotates the parent relationship between the current comment and the node
