Resource Description Framework

Release: 2009-10-31
Jump to Web Standards Articles TOC

RDF/XML

Resource Description Framework (RDF) is the industry standard in describing and exchanging information about anything in the world of the Internet. The RDF concept is structured in 'triples': subject, predicate and object.

A subject is the thing you are describing – a webpage, an image, a contact, a person in a company. Its predicate is the type of fact you are particularly describing – file size, colour, name, age, title, URI. The object is the actual value of the predicate – '26KiloBytes', 'Midnight Blue', 'San Qwe', '902', 'Articles of Storan', 'http://articles.nowhere.com.bc/storan_home.html#section1268'.

RDF can be displayed in a number of formats including a visual graph, a procedural language or even markup. One of the common formats is using an XML structure called RDF/XML.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF [
  <!ENTITY xs "http:www.w3.org/2001/XMLSchema#">
  <!ENTITY zt "http://test.examples.org/terms#">
]>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:z="http://test.examples.org/metadata/">
  <rdf:Description rdf:about="http://articles.nowhere.com.bc/storan_home.html#section1268">
    <dcterms:author rdf:resource="#author"/>
    <z:filesize rdf:datatype="&zt;electronicSize">26KiloBytes</z:filesize>
    <dcterms:title rdf:datatype="&xs;string">Articles of Storan</dcterms:title>
    <z:categoryColour rdf:datatype="&zt;colour">Midnight Blue</z:categoryColour>
  </rdf:Description>

  <rdf:Description rdf:ID="author">
    <z:givenName>San</z:givenName>
    <z:familyName>Qwe</z:familyName>
    <z:age>902</z:age>
  </rdf:Description>
</rdf:RDF>
Figure 1: An RDF/XML Document

The RDF/XML document above describes the 1268th section of the webpage at http://articles.nowhere.com.bc/storan_home.html (the subject). Stating its author, filesize, title and category colour (predicates). The value (object) has its character restrictions referred to by the rdf:datatype attribute. The author refers to another description that is all about the author (uniquely identified just by author)(subject) and stating the given name, family name and age (predicates).

As you can see RDF is just the framework and any other XML structure can be used for the predicates as long as they are bound to an XML Namespace. Resource Description Framework is mostly used for storing and sharing metadata (data about data) but is also used for program preferences, manifests and database formats.

RDF Documents tend to have a .rdf file extension and have the MIME Type of 'application/rdf+xml'.

Dublin Core

A common set of predicates are provided from Dublin Core Metadata Terms with the namespace 'http://purl.org/dc/terms/' and usually the prefix 'dcterms'. Such predicates include title, creator, description, publisher, contributor, language (such as en-GB) and rights (copyrights information). You can find the complete list of terms at http://www.dublincore.org/documents/dcmi-terms/.

Copyright ©2005-2010 Legend Scrolls and Peter Davison.
Icons from the Oxygen Icon Theme, LGPL, and PNG version of icons in the Oxygen Icon Theme from kde-look.org, GPL.
All rights reserved.