RDF/RDFa (D7)

Last updated on
6 October 2020

RDF/RDFa is major new functionality in Drupal 7 which describes Drupal entities (nodes, user, comments, terms) and their relationship in a format machines can understand. Mappings are defined between local Drupal entities and widely used vocabularies like Dublin Core, FOAF, SIOC, SKOS, etc. These mappings are stored in arrays and can be defined via programming in the modules. They can also be altered the same way as forms, links, etc.

A User Interface in the contributed modules will allow users to edit these mappings in the same fashion as the RDF API or RDF CCK currently do for Drupal 6.

RDF model vs. RDFa serialization

The RDF model is about describing objects, their relationships and their values: put together they form an RDF graph representing the data model. This RDF data must then be serialized so machines can read and understand it (the same way one serializes an object in PHP so it can be stored/transfered to another script). RDFa is the format which was chosen for Drupal core. It allows to inject the semantics of the data directly into the HTML generated for each page. Therefore it requires Drupal theme layer to be adapted. There are other RDF serialization formats such as RDF/XML, N-Triples, Turtle, etc. While the data is only serialized in RDFa in Drupal core, the RDF model is made available in memory for eventual modules willing to serialize it in other formats.

To help you get started:

Grab a patch, get mentored!

Below, we've organized the issues by category and assigned each a difficulty rating. These are very rough estimates and could be significantly inaccurate, but are at least a general guideline for how complex the issue/patch is.
Where the difficulty scale is defined as follows: 1: Simple. 2: Very easy. 5: Average. 8: Challenging. 10: Hard.

Known Issues

6 #538164: Comment body as field (dependency, would make the RDFa integration for comments automatic)
4 #614508: Annotate tracker page with RDFa
1 #616552: Better module description for the core RDF module

8 #493030: RDF #1: core RDF module
7 #493094: RDF #3: field module
5 #569308: Add RDF to comment module
6 #569226: Add RDF/RDFa to Terms
7 #493086: RDF #2: node module
3 #493238: Add RDF to the blog module
6 #493056: Add RDF to the user module

General Discussion of Strategies for RDF in Core
7 #378144: RDFa: Add semantics from the ground up

Other
#490916: Add a concept URI field to taxonomy terms
#192056: User's raw login name should not be output directly
#352204: RDFa: author and date on node and comment

Help improve this page

Page status: No known problems

You can: