Commit 006207d7 authored by Dries's avatar Dries

- Patch #712538 by scor: clean up RDF namespaces and mappings before Drupal 7 release.

parent 0bda56b5
......@@ -90,18 +90,13 @@ function hook_rdf_mapping() {
*/
function hook_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/',
'owl' => 'http://www.w3.org/2002/07/owl#',
'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
'og' => 'http://ogp.me/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#',
);
......
......@@ -81,10 +81,7 @@ function rdf_rdf_namespaces() {
'dc' => 'http://purl.org/dc/terms/',
'foaf' => 'http://xmlns.com/foaf/0.1/',
'og' => 'http://ogp.me/ns#',
'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#',
'sioct' => 'http://rdfs.org/sioc/types#',
'skos' => 'http://www.w3.org/2004/02/skos/core#',
......
......@@ -688,7 +688,7 @@ class RdfGetRdfNamespacesTestCase extends DrupalWebTestCase {
// Get all RDF namespaces.
$ns = rdf_get_namespaces();
$this->assertEqual($ns['owl'], 'http://www.w3.org/2002/07/owl#', t('A prefix declared once is included.'));
$this->assertEqual($ns['rdfs'], 'http://www.w3.org/2000/01/rdf-schema#', t('A prefix declared once is included.'));
$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.'));
......
......@@ -2017,7 +2017,7 @@ class DrupalGetRdfNamespacesTestCase extends DrupalWebTestCase {
$xml = new SimpleXMLElement($this->content);
$ns = $xml->getDocNamespaces();
$this->assertEqual($ns['owl'], 'http://www.w3.org/2002/07/owl#', t('A prefix declared once is displayed.'));
$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.'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment