There’s a lot of hype around RDF and the semantic Web, but the core concept of the Resource Description Framework (RDF) is simple:
An RDF document is just a series of statements about resources in a subject-predicate-object (triplet) form. In other words, they are statements where a resource (R) has a property (P) of a value (V)—a triplet (R,P,V). For example: ("Raymond Yee", "has age of ", 40)
.
RDF vocabularies define ways to talk about such things as types of resources and terms for properties. For example, a genealogical vocabulary would define properties such as “is mother of” and “is sister of.”
Once we have these types of RPVs around, we can add to the mix various logical propositions. If V > 30 of an RPV with P="has age of"
, then (R, "has to trust status", No)
. In other words, a computer program should be able to deduce that Raymond Yee should not be trusted since he is older than 30, since one must not trust anyone older than 30.
Tim Bray’s “What is RDF?” (http://www.xml.com/pub/a/2001/01/24/rdf.html
) was the first essay I read in my attempts to understand RDF. It’s still very good. However, I think that the triplets idea was still unclear to me after reading the essay. (And I don’t blame Tim Bray for that since the idea is clearly in the essay.) So, you should follow up Bray’s essay with reading something like Aaron Schwartz’s “RDF Primer Primer” (http://notabug.com/2002/rdfprimer/
). The two complement each other.
You can express RDF triplets in many ways, including the standard RDF/XML syntax (http://www.w3.org/TR/rdf-syntax-grammar/
). Since we have been discussing how microformats embed machine-understandable data in (X)HTML, we’ll now look at RDFa (http://?
rdfa.info/about/
), described in the following way:
With RDFa, you can easily include extra “structure” in your HTML to indicate a calendar event, contact information, a document license, etc. . . . RDFa is about total publisher control: you choose which attributes to use, which to reuse from other sites, and how to evolve, over time, the meaning of these attributes.
Here is a sample RDFa assertion, in which the resource (a book with ISBN of 9781590598580) has a property (namely, the Dublin Core title) whose value is Pro Web 2.0 Mashups: Remixing Data and Web Services
:[320]
<span xmlns:dc="http://purl.org/dc/elements/1.1/" about="isbn:9781590598580" property="dc:title">Pro Web 2.0 Mashups: Remixing Data and Web Services</span>
I think that microformats and RDFa will both have a place on the Web. Microformats already have some good uptake and are grounded in today’s real-world problems. They are focused on very specific applications. RDFa provides a mechanism for making more general assertions about pieces of data.