Gautier Poupeau provides a fun RDFa example, where he marks up some content with a bit of RDFa to express semantics, and then uses a script to actually parse and make use of this semantic markup. What’s most interesting is that Gautier mentions the “normalized syntax” of RDFa as an advantage in doing this kind of development. Syntax and Vocabulary are two different things. RDFa is a single syntax for embedding semantics into HTML, but of course you then have the full power of RDF vocabularies right there at your fingertips.
Archive for May 2007
Cédric Mesnage has just announced a plug-in that provides Ruby on Rails programmers with an API that enables them to easily publish RDFa. More details are in his log post RDFa on Rails, the Semantic Web made simple. The RDFa on Rails project itself, is hosted at RubyForge.
A typical use would be:
<% rdfa_post url_for(post) do %>
<% rdfa_title post.title do %>
<h1><%= link_to post.title, {:controller => :posts, :action => :show,
:id => post.id} %></h1>
<% end %>
<h4><%= rdfa_creator post.author %> the <%= rdfa_date post.created_at %></h4>
<div><%= rdfa_post_content post.content %></div>
<h5>Tags :
<% for tag in post.tags %>
<%= rdfa_link_to_tag tag.term, url_for(tag) %>
<% end %>
</h5>
<% end %>
Following on from the announcements that Jena supports RDFa and Firefox Plugin Operator supports RDFa this is great news, showing a rapid growth in awareness of RDFa amongst some key development communities.
HP’s Jena framework for building semantic web applications in Java now supports RDFa. Jeremy Carroll provides sample code for reading any RDFa in any HTML document:
Model m = createMemModel();
RDFReader r = m.getReader("GRDDL");
r.setProperty("grddl.rdfa", "true");
r.read(m, "http://www.w3.org/2001/sw/grddl-wg/td/hCardFabien-RDFa.html");
Model m2 = createMemModel();
m2.read(
"http://www.w3.org/2001/sw/grddl-wg/td/hCardFabien-output.rdf",
"http://www.w3.org/2001/sw/grddl-wg/td/hCardFabien-RDFa.html",
"RDF/XML");
assertIsoModels(m2, m);
It’s always important to note the difference between RDFa and some other approaches to HTML-embedded structured data: the above code is all you need for any vocabulary, even ones that haven’t been invented yet.
At XTech 2007 in Paris, France, last week, Elias Torres presented one of the best talks on RDFa to date, Open Data in HTML, which was above all fascinating for the demonstration of how easy it was to add new actions to Michael Kaply and his RDFa addon to the Operator plugin for Firefox, and showing finding places on maps, adding events to a calendar and people to a contacts list from an RDFa-enhanced webpage.
There were several talks that included RDFa at the WWW Conference in Banff that ended recently. These included:
- Moving Stuff – Linking Desktops with semiBlog, the Semantic Clipboard and RDFa, by Knud Möller (DERI/NUIG).
- Bootstrapping the Semantic Web with GRDDL, Microformats, and RDFa, by Harry Halpin (U. of Edinburgh) and Fabien Gandon (INRIA)
- A grounded ontology for identity and reference of web resources, by Aldo Gangemi and Valentina Presutti (Laboratory for Applied Ontology National Research Council (ISTC-CNR))
- Deploying Web-scale Mash-ups by Linking Microformats and the Semantic Web, by Dan Connolly (MIT), Harry Halpin (University of Edinburgh), and Murray Maloney (Muzmo Inc.)
- xH: A Standards-based Web Application Programming Language, by Mark Birbeck (x-port.net)
- Atom Publishing with Apache Abdera, by Benjamin Szekely (IBM)
Elias Torres and Michael Kaply have announced that the next release of Operator will support RDFa. But not just like the bookmarklets. They’ve built a real programmatic architecture so that it’s easy to add a handler for different types of RDFa data.
This is a fantastically important piece of the structured web data puzzle. Imagine, if you want to help your users manage some kind of data type, just build an Operator handler, and anywhere RDFa appears with that data type, your users can grab it and let your web site handle it. True, structured, loosely coupled web data, without any authority to contact to get your vocabulary approved.
Hats off to Michael and Elias, this is great news for the web community.
Fresh from the Mindswap Blog: Ora Lassila and James Hendler have an excellent article about Embracing Web 3.0 in IEEE Internet Computing. For short, Web 3.0 is Semantic Web and Web 2.0 – with RDFa being one of the important enabling technologies:
W3C is working on new approaches, such as Gleaning Resource Descriptions from Dialects of Languages (GRDDL) and RDFa, to standardize the linking of structured data with instructions on how to transform or embed data into existing Web resources.
