summaryrefslogtreecommitdiff
path: root/modules/rdf
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-10 16:37:19 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-10 16:37:19 +0000
commite892ed5c317f7d37da09a2ad3a0e113703437b10 (patch)
tree6da9fe80374cabfe7885ff0c0d547468649353bd /modules/rdf
parentb225882e5e8adfe6a3f21dbd7f1e8f858cd41c79 (diff)
downloadbrdo-e892ed5c317f7d37da09a2ad3a0e113703437b10.tar.gz
brdo-e892ed5c317f7d37da09a2ad3a0e113703437b10.tar.bz2
- Patch #712538 by scor: clean up RDF namespaces and mappings before Drupal 7 release.
Diffstat (limited to 'modules/rdf')
-rw-r--r--modules/rdf/rdf.module9
-rw-r--r--modules/rdf/rdf.test8
2 files changed, 7 insertions, 10 deletions
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module
index 78dfb6e34..0c6ea4f8a 100644
--- a/modules/rdf/rdf.module
+++ b/modules/rdf/rdf.module
@@ -77,7 +77,6 @@ define('RDF_DEFAULT_BUNDLE', '');
*/
function rdf_rdf_namespaces() {
return array(
- 'admin' => 'http://webns.net/mvcb/',
'content' => 'http://purl.org/rss/1.0/modules/content/',
'dc' => 'http://purl.org/dc/terms/',
'foaf' => 'http://xmlns.com/foaf/0.1/',
@@ -85,10 +84,8 @@ function rdf_rdf_namespaces() {
'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/',
- 'tags' => 'http://www.holygoat.co.uk/owl/redwood/0.1/tags/',
'sioc' => 'http://rdfs.org/sioc/ns#',
'sioct' => 'http://rdfs.org/sioc/types#',
- 'ctag' => 'http://commontag.org/ns#',
'skos' => 'http://www.w3.org/2004/02/skos/core#',
'xsd' => 'http://www.w3.org/2001/XMLSchema#',
);
@@ -439,7 +436,7 @@ function rdf_process(&$variables, $hook) {
function rdf_preprocess_node(&$variables) {
// Adds RDFa markup to the node container. The about attribute specifies the
// URI of the resource described within the HTML element, while the typeof
- // attribute indicates its RDF type (foaf:Document, or sioc:User, etc.).
+ // attribute indicates its RDF type (foaf:Document, or sioc:Person, etc.).
$variables['attributes_array']['about'] = empty($variables['node_url']) ? NULL: $variables['node_url'];
$variables['attributes_array']['typeof'] = empty($variables['node']->rdf_mapping['rdftype']) ? NULL : $variables['node']->rdf_mapping['rdftype'];
@@ -549,8 +546,8 @@ function rdf_preprocess_user_profile(&$variables) {
$variables['attributes_array']['typeof'] = $account->rdf_mapping['rdftype'];
$variables['attributes_array']['about'] = url($uri['path'], $uri['options']);
}
- // Adds the relationship between the sioc:User and the foaf:Person who holds
- // the account.
+ // Adds the relationship between the sioc:UserAccount and the foaf:Person who
+ // holds the account.
$account_holder_meta = array(
'#tag' => 'meta',
'#attributes' => array(
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test
index 6182717f8..f6b28c27a 100644
--- a/modules/rdf/rdf.test
+++ b/modules/rdf/rdf.test
@@ -322,7 +322,7 @@ class RdfMappingDefinitionTestCase extends DrupalWebTestCase {
$account_uri = url('user/' . $user2->uid);
$person_uri = url('user/' . $user2->uid, array('fragment' => 'me'));
- $user2_profile_about = $this->xpath('//div[@class="profile" and @typeof="sioc:User" and @about=:account-uri]', array(
+ $user2_profile_about = $this->xpath('//div[@class="profile" and @typeof="sioc:UserAccount" and @about=:account-uri]', array(
':account-uri' => $account_uri,
));
$this->assertTrue(!empty($user2_profile_about), t('RDFa markup found on user profile page'));
@@ -331,7 +331,7 @@ class RdfMappingDefinitionTestCase extends DrupalWebTestCase {
':person-uri' => $person_uri,
':account-uri' => $account_uri,
));
- $this->assertTrue(!empty($user_account_holder), t('URI created for account holder and username set on sioc:User.'));
+ $this->assertTrue(!empty($user_account_holder), t('URI created for account holder and username set on sioc:UserAccount.'));
$user_username = $this->xpath('//meta[@about=:account-uri and contains(@property, "foaf:name") and @content=:username]', array(
':account-uri' => $account_uri,
@@ -346,7 +346,7 @@ class RdfMappingDefinitionTestCase extends DrupalWebTestCase {
$this->drupalGet('node/' . $node->nid);
// Ensures the default bundle mapping for user is used on the Authored By
// information on the node.
- $author_about = $this->xpath('//a[@typeof="sioc:User" and @about=:account-uri and @property="foaf:name" and contains(@xml:lang, "")]', array(
+ $author_about = $this->xpath('//a[@typeof="sioc:UserAccount" and @about=:account-uri and @property="foaf:name" and contains(@xml:lang, "")]', array(
':account-uri' => $account_uri,
));
$this->assertTrue(!empty($author_about), t('RDFa markup found on author information on post. xml:lang on username is set to empty string.'));
@@ -466,7 +466,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
$this->assertTrue(!empty($tracker_title), t('Title property attribute found on @user content.', array('@user'=> $user)));
// Tests whether the relationship between the content and user has been set.
- $tracker_user = $this->xpath('//tr[@about=:url]//td[contains(@rel, "sioc:has_creator")]//*[contains(@typeof, "sioc:User") and contains(@property, "foaf:name")]', array(':url' => $url));
+ $tracker_user = $this->xpath('//tr[@about=:url]//td[contains(@rel, "sioc:has_creator")]//*[contains(@typeof, "sioc:UserAccount") and contains(@property, "foaf:name")]', array(':url' => $url));
$this->assertTrue(!empty($tracker_user), t('Typeof and name property attributes found on @user.', array('@user'=> $user)));
// There should be an about attribute on logged in users and no about
// attribute for anonymous users.