Tuesday 3 January 2012

What Is RDF and Why Should I Care?

RDF IconIn a previous article we discussed how the Semantic Web is about making content easier for machines to interpret. This is accomplished in a number of ways including tagging content as structured data and defining content as linked data within the Linked Open Data cloud (LOD). RDF provides us with a framework to do both.
RDF stands for Resource Description Framework. This framework is used to represent data in the LOD cloud as an XML file, and is the basis for RDFa, a format used to mark up content as structured data for the Semantic Web.
This article provides a basic explanation of RDF and RDFa. Subsequent articles will demonstrate how to use RDFa to mark up your content as structured data and how to create static RDF files as a means for adding your content to the LOD cloud.
The following is a very basic explanation of how data is represented using RDF. For more detailed information check out the W3C's RDF primer.
As its name implies, RDF is a way to define resources using a specific framework. That framework is based on the concept of “triples.” Each resource is represented by a number of triples.
A triple consists of a subject, a predicate, and an object that mirrors a simple sentence structure like:

SUBJECT

PREDICATE

OBJECT

Deltina

[has the] Web site

http://www.deltina.com

Deltina

[is] employed at

http://www.plumbwebsolutions.com

Deltina

Knows

John Smith

John Smith

[is] also known as

http://www.DrWho.com

 
RDF triples take on the following forms:
  1. The subject is a URI (a type of link) identifying the described resource.
  2. The object can be a literal value like a text value, number, or date (“John Smith” in our example); or it can be the URI of another resource that is in some way related to the subject (“http://deltina.com” in our example).
  3. Like a basic sentence structure, the predicate indicates what kind of relationship exists between the subject and the object, such as a name or date of birth (in the case of a literal, i.e., not a link) or an employer or someone the person knows (in the case of another resource represented by a link). The predicate is also a URI, but predicate URIs come from established vocabularies—collections of URIs that are used to represent information about a broad topic. For example:

    Using these vocabularies and the RDF standard, XML files are generated to classify Web content in a consistent way. When added to the Linked Open Data cloud, the content then becomes an integrated part of the “cloud” available to link to other content that is classified using the same vocabularies.
    What about RDFa?
    RDFa is RDF in attributes. What this means is that RDF triples can be used directly within XHTML and HTML to mark up content as structured data. Note: Though RDFa attributes can be used within HTML, they do not currently validate.
    As an example, Google has developed its own vocabulary for use with RDFa. Using this vocabulary, you can mark up your HTML content so that Google will recognize it as structured data and display it in their search results as “Rich Snippets.”
    Understanding the concept of triples as described above is paramount to using RDF and RDFa successfully. In upcoming articles we will demonstrate how to use RDF files and RDFa to prepare your content for the Semantic Web.
    Author: Deltina Hay


 

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews