RDF Mapping API

Last modified: November 4, 2009 - 04:40

RDF makes your site's content easy to re-use and display in useful ways—such as making Google and Yahoo! search results more informative and visually appealing—by enriching the markup with contextual information.

By default Drupal uses RDFa, which is RDF in HTML attributes. For instance, if a page has information about a person named Jane Doe, it could be represented in RDFa like this:

<div typeof="foaf:Person">
   <h2 property="foaf:name">Jane Doe</h2>
</div>

The node is mapped to an RDF type, 'foaf:Person', and the title is mapped to an RDF property, 'foaf:name'.

There are default mappings for some entities, used on properties like title and date created. These defaults are inserted automatically into the markup when the module is enabled.

The RDF Mappings API allows you to define your own mappings for content types and to alter existing mappings.

 
 

Drupal is a registered trademark of Dries Buytaert.