RDF Mapping API

Functions to describe entities and bundles in RDF.

The RDF module introduces RDF and RDFa to Drupal. RDF is a W3C standard to describe structured data. RDF can be serialized as RDFa in XHTML attributes to augment visual data with machine-readable hints.

Modules can provide mappings of their bundles' data and metadata to RDF classes and properties. This module takes care of injecting these mappings into variables available to theme functions and templates. All Drupal core themes are coded to be RDFa compatible.

Example mapping from node.module:

  'type' => 'node',
  'bundle' => RDF_DEFAULT_BUNDLE,
  'mapping' => array(
    'rdftype' => array(
    'title' => array(
      'predicates' => array(
    'created' => array(
      'predicates' => array(
      'datatype' => 'xsd:dateTime',
      'callback' => 'date_iso8601',
    'body' => array(
      'predicates' => array(
    'uid' => array(
      'predicates' => array(
    'name' => array(
      'predicates' => array(

See also




drupal/core/modules/rdf/rdf.module, line 23
Enables semantically enriched output for Drupal sites in the form of RDFa.


Namesort descending Location Description
hook_rdf_mapping drupal/core/modules/rdf/rdf.api.php Allow modules to define RDF mappings for field bundles.
hook_rdf_namespaces drupal/core/modules/rdf/rdf.api.php Allow modules to define namespaces for RDF mappings.
rdf_get_namespaces drupal/core/modules/rdf/rdf.module Retrieves RDF namespaces.
rdf_mapping_delete drupal/core/modules/rdf/rdf.module Deletes the mapping for the given bundle from the database.
rdf_mapping_load drupal/core/modules/rdf/rdf.module Returns the mapping for attributes of a given entity type/bundle pair.
rdf_mapping_save drupal/core/modules/rdf/rdf.module Saves an RDF mapping to the database.
rdf_rdfa_attributes drupal/core/modules/rdf/rdf.module Builds an array of RDFa attributes for a given mapping.
rdf_rdf_namespaces drupal/core/modules/rdf/rdf.module Implements hook_rdf_namespaces().
theme_rdf_metadata drupal/core/modules/rdf/rdf.module Returns HTML for a series of empty spans for exporting RDF metadata in RDFa.
theme_rdf_template_variable_wrapper drupal/core/modules/rdf/rdf.module Returns HTML for a template variable wrapped in an HTML element with the RDF attributes.


Namesort descending Location Description
RDF_DEFAULT_BUNDLE drupal/core/modules/rdf/rdf.module RDF bundle flag: Default bundle.