Search: in
RDFa in Encyclopedia Encyclopedia
  Tutorials     Encyclopedia     Videos     Books     Software     DVDs  


RDFa (or Resource Description Framework in attributes) is a W3C Recommendation that adds a set of attribute-level extensions to XHTML for embedding rich metadata within Web documents. The RDF data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents, it also enables the extraction of RDF model triples by compliant user agents.

The W3C RDF in XHTML Taskforce is also working on an implementation for non-XML versions of HTML.[1] The primary issue for the non-XML implementation is how to handle the lack of XML namespaces.

The RDFa community runs a wiki to host tools, examples, and tutorials.[2]



RDFa was first proposed by Mark Birbeck in the form of a W3C note entitled XHTML and RDF,[3] which was then presented to the Semantic Web Interest Group at the W3C's 2004 Technical Plenary.[3] Later that year the work became part of the sixth public Working Draft of XHTML 2.0.[4] Although it is generally assumed that RDFa was originally intended only for XHTML 2, in fact the purpose of RDFa was always to provide a way to add a metadata to any XML-based language. Indeed, one of the earliest documents bearing the RDF/A Syntax name, has the sub-title A collection of attributes for layering RDF on XML languages.[5] The document was written by Mark Birbeck and Steven Pemberton, and was made available for discussion on October 11, 2004.

In April 2007 the XHTML 2 Working Group produced a module to support RDF annotation within the XHTML 1 family.[6] As an example, it included an extended version of XHTML 1.1 dubbed XHTML+RDFa 1.0. Although described as not representing an intended direction in terms of a formal markup language from the W3C, limited use of the XHTML+RDFa 1.0 DTD did subsequently appear on the public Web.[7]

October 2007 saw the first public Working Draft of a document entitled RDFa in XHTML: Syntax and Processing.[8] This superseded and expanded upon the April draft; it contained rules for creating an RDFa parser, as well as guidelines for organizations wishing to make practical use of the technology.

In October 2008 RDFa reached Recommendation status.[9]

An additional RDFa Primer document was last updated in June 2008.[10] (The first public Working Draft dates back to March 2006.)


The essence of RDFa is to provide a set of attributes that can be used to carry metadata in an XML language (hence the 'a' in RDFa).

These attributes are:

  • about and src a URI or CURIE specifying the resource the metadata is about
  • rel and rev specifying a relationship or reverse-relationship with another resource
  • href and resource specifying the partner resource
  • property specifying a property for the content of an element
  • content optional attribute that overrides the content of the element when using the property attribute
  • datatype optional attribute that specifies the datatype of text specified for use with the property attribute
  • typeof optional attribute that specifies the RDF type(s) of the subject (the resource that the metadata is about).

Benefits of RDFa

Five "principles of interoperable metadata" met by RDFa.[11]

  • Publisher Independence each site can use its own standards
  • Data Reuse data is not duplicated. Separate XML and HTML sections are not required for the same content.
  • Self Containment The HTML and the RDF are separated
  • Schema Modularity The attributes are reusable
  • Evolvability additional fields can be added and XML transforms can extract the semantics of the data from an XHTML file

Additionally RDFa may benefit web accessibility as more information is available to assistive technology.[12]

Examples of RDFa

The following is an example of adding Dublin Core metadata to an XHTML file. Dublin Core data elements are data typically added to a book or article (title, author, subject etc.)

  xmlns:dc=""   about="">    property="dc:title">Wikinomics    property="dc:creator">Don Tapscott    property="dc:date">2006-10-01  

Moreover, RDFa allows the passages and words within a text to be associated with semantic markup:

  xmlns:dc=""    about="">   In his latest book    property="dc:title">Wikinomics,    property="dc:creator">Don Tapscott   explains deep changes in technology,   demographics and business.   The book is due to be published in    property="dc:date" content="2006-10-01">October 2006. 

XHTML+RDFa 1.0 example

The following is an example of a complete XHTML+RDFa 1.0 document. It uses Dublin Core and FOAF, an ontology for describing people and their relationships with other people and things:

 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"     "">  xmlns=""     xmlns:foaf=""     xmlns:dc=""     version="XHTML+RDFa 1.0" xml:lang="en">        </font></b>John's Home Page<b><font color="#7F0055">      href="" />      property="dc:creator" content="Jonathan Doe" />      rel="foaf:primaryTopic" href="" />       about="">     

John's Home Page

My name is property="foaf:nick">John D and I like href="" rel="foaf:interest" xml:lang="de">Einst rzende Neubauten.

My rel="foaf:interest" resource="urn:ISBN:0752820907">favorite book is the inspiring about="urn:ISBN:0752820907"> property="dc:title">Weaving the Web by property="dc:creator">Tim Berners-Lee

In the example above, the document URI can be seen as representing an HTML document, but the document URI plus the "#me" string represents the actual person, as distinct from a document about them. The foaf:primaryTopic in the header tells us a URI of the person the document is about. The foaf:nick property (in the first span element) contains a nickname for this person, and the dc:creator property (in the meta element) tells us who created the document. The hyperlink to the Einst rzende Neubauten website contains rel="foaf:interest", suggesting that John Doe is interested in this band. The URI of their website is a resource.

The foaf:interest inside the second p element is referring to a book by ISBN number. The resource attribute defines a resource in a similar way to the href attribute, but without defining a hyperlink. Further into the paragraph, a span element containing an about attribute defines the book as another resource to specify metadata about. The book title and author are defined within the contents of this tag using the dc:title and dc:creator properties.

Here are the same triples when the above document is automatically converted to RDF/XML:

 <?xml version="1.0" encoding="UTF-8"?> :RDF xmlns:rdf=""     xmlns:foaf=""     xmlns:dc="">   :Description rdf:about="">     :creator xml:lang="en">Jonathan Doe:creator>     :primaryTopic>       :Description rdf:about="">         :nick xml:lang="en">John D:nick>         :interest rdf:resource=""/>         :interest>           :Description rdf:about="urn:ISBN:0752820907">             :creator xml:lang="en">Tim Berners-Lee:creator>             :title xml:lang="en">Weaving the Web:title>           :Description>         :interest>       :Description>     :primaryTopic>   :Description> :RDF> 

Web-based RDFa extractors

There are tools that are available on the Web to extract RDF information embedded within Web documents as RDFa, these tools include:

  • Sindice Inspector a tool for showing the structured data (such as microformats or RDFa) contained in HTML documents. It can also accept input in RDF/XML, Turtle or N-Triple format.
  • Ubiquity RDFa parser can be used as a bookmarklet to extract RDF information from RDFa embedded pages.

Web-based RDFa editors

There are already a few RDFa editors available online:

See also

  • Microformats, a simplified approach to semantically annotate data in websites
  • Open Graph protocol, a way to enables developers to integrate their pages into the Facebook social graph
  • Microdata (HTML) - another approach at embedding semantics in HTML using additional attributes
  • eRDF, an alternative to RDFa
  • GRDDL, a way to extract (annotated) data out of XHTML and XML documents and transform it into an RDF graph


External links

cs:RDFa es:RDFa fr:RDFa pms:RDFa pt:RDFa zh:RDFa

Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article

Search for RDFa in Tutorials
Search for RDFa in Encyclopedia
Search for RDFa in Videos
Search for RDFa in Books
Search for RDFa in Software
Search for RDFa in DVDs
Search for RDFa in Store


RDFa in Encyclopedia
RDFa top RDFa

Home - Add TutorGig to Your Site - Disclaimer

©2011-2013 All Rights Reserved. Privacy Statement