function theme_rdf_metadata

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 rdf.module theme_rdf_metadata($variables)
cle7 rdf.module theme_rdf_metadata($variables)
elmsmedia7 rdf.module theme_rdf_metadata($variables)
icor7 rdf.module theme_rdf_metadata($variables)
meedjum_blog7 rdf.module theme_rdf_metadata($variables)
mooc7 rdf.module theme_rdf_metadata($variables)

Returns HTML for a series of empty spans for exporting RDF metadata in RDFa.

Sometimes it is useful to export data which is not semantically present in the HTML output. For example, a hierarchy of comments is visible for a human but not for machines because this hiearchy is not present in the DOM tree. We can express it in RDFa via empty <span> tags. These aren't visible and give machines extra information about the content and its structure.

Parameters

$variables: An associative array containing:

  • metadata: An array of attribute arrays. Each item in the array corresponds to its own set of attributes, and therefore, needs its own element.

See also

rdf_process()

Related topics

1 theme call to theme_rdf_metadata()
rdf_process in modules/rdf/rdf.module
Template process function for adding extra tags to hold RDFa attributes.
2 string references to the theme hook from theme_rdf_metadata()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

rdf_process in modules/rdf/rdf.module
Template process function for adding extra tags to hold RDFa attributes.
rdf_theme in modules/rdf/rdf.module
Implements hook_theme().

File

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

Code

function theme_rdf_metadata($variables) {
  $output = '';
  foreach ($variables['metadata'] as $attributes) {
    // Add a class so that developers viewing the HTML source can see why there
    // are empty <span> tags in the document. The class can also be used to set
    // a CSS display:none rule in a theme where empty spans affect display.
    $attributes['class'][] = 'rdf-meta';
    // The XHTML+RDFa doctype allows either <span></span> or <span /> syntax to
    // be used, but for maximum browser compatibility, W3C recommends the
    // former when serving pages using the text/html media type, see
    // http://www.w3.org/TR/xhtml1/#C_3.
    $output .= '<span' . drupal_attributes($attributes) . '></span>';
  }
  return $output;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.