Friday, July 13, 2007

RDFa used in Joost

Joost have started to put a little RDFa into their pages. To see an example, here's a link to a documentary about Ancient Rome. Each of the entries in Joost has a page like this, containing information about the video. If you do a 'view source' you'll see that the first thing the document does is declare the namespaces that will be needed:
<html
xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
>
This simply indicates which vocabularies are going to be used in the docment--in this case FOAF and Dublin Core.

The first piece of mark-up that's of interest is that the concept primaryTopic from the FOAF vocabulary is used to indicate what exactly this page is about. This simply involves using a link element to point to the relevant part of the HTML document, and using a prefixed value for the property (in @rel):
 <head>
<title>Joost™ Link: Treasure Seekers: In The Shadow of Ancient Rome</title>
...
<link rel="foaf:primaryTopic" href="#video-itself" />
...
</head>
This has established that the primary topic of this document is some other part of the document, and if you understand triples you'll know that this means:
<http://www.joost.com/032001z> foaf:primaryTopic <http://www.joost.com/032001z#video-itself> .
Next the document has some text that the user can read. But the advantage of using RDFa is that both data and metadata can be combined into a single document; in this case the text that the user can read can also become metadata about the video, making use of the concepts 'title' and 'description' from Dublin Core:
 <body>
...
<div id="contentArea">
<!-- content area -->
<div about="#video-itself">
<p property="dc:title">Treasure Seekers: In The Shadow of Ancient Rome</p>
<p property="dc:description">
Wealthier and more powerful than any other ancient civilization, the
Roman Empire enjoyed a long period of prosperity. But perhaps the
greatest treasure of this period was not its riches, but its myth.
Join National Geographic and relive the glories of the Roman Empire
and see why it has inspired dreamers and dictators throughout the ages.
</p>
</div>
This would give us the following triples:
<http://www.joost.com/032001z#video-itself> dc:title "Treasure Seekers: ..." .
<http://www.joost.com/032001z#video-itself> dc:description "Wealthier and more powerful ..." .
Later in the document there is a section of 'additional information' about the video, and the mark-up here shows another feature of RDFa; the ability to have metadata that is more precise than the text used for human readers:
  <div id="additionalinfo" about="#video-itself">
...
<p property="dc:subject" content="Documentary">Category: Documentary


...
</div>
</div>
...
</body>
</html>
This gives another triple that explains the subject-matter of the documentary:
<http://www.joost.com/032001z#video-itself> dc:subject "Documentary" .
The advantage of this feature is that even if the inline text were in a different language for different audiences, the metadata produced would still be the same.

The way Joost are beginning to use RDFa shows that with just a handful of attributes, information about the content of the document--and its purpose--has been made available, to external processors. This could then be used to obtain further information about the film, or even find other films on similar topics. This is one of the primary use-cases for RDFa, so it's exciting to see the data being made available in this way; who is going to be the first to create some functionality in Operator to make use of it?

Labels: , , , , , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home