The W3C have recently announced that the RDFa API draft has been published. As described in the announcement “RDFa enables authors to publish structured information that is both human- and machine-readable. Concepts that have traditionally been difficult for machines to detect, like people, places, events, music, movies, and recipes, are now easily marked up in Web documents“.
The RDFa API draft document itself helpfully provides several examples which illustrate the potential benefits of use of RDFa:
Enhanced Browser Interfaces: Dave is writing a browser plugin that filters product offers in a web page and displays an icon to buy the product or save it to a public wishlist. The plugin searches for any mention of product names, thumbnails, and offered prices. The information is listed in the URL bar as an icon, and upon clicking the icon, displayed in a sidebar in the browser. He can then add each item to a list that is managed by the browser plugin and published on a wishlist website.
Data-based Web Page Modification: Dale has a site that contains a number of images, showcasing his photography. He has already used RDFa to add licensing information about the images to his pages, following the instructions provided by Creative Commons. Dale would like to display the correct Creative Commons icons for each image so that people will be able to quickly determine which licenses apply to each image.
Automatic Summaries: Mary is responsible for keeping the projects section of her company’s home page up-to-date. She wants to display info-boxes that summarize details about the members associated with each project. The information should appear when hovering the mouse over the link to each member’s homepage. Since each member’s homepage is annotated with RDFa, Mary writes a script that requests the page’s content and extracts necessary information via the RDFa API.
Data Visualisation: Richard has created a site that lists his favourite restaurants and their locations. He doesn’t want to generate code specific to the various mapping services on the Web. Instead of creating specific markup for Yahoo Maps, Google Maps, MapQuest, and Google Earth, he instead adds address information via RDFa to each restaurant entry. This enables him to build on top of the structured data in the page as well as letting visitors to the site use the same data to create innovative new applications based on the address information in the page.
Linked Data Mashups: Marie is a chemist, researching the effects of ethanol on the spatial orientation of animals. She writes about her research on her blog and often makes references to chemical compounds. She would like any reference to these compounds to automatically have a picture of the compound’s structure shown as a tooltip, and a link to the compound’s pharmacy online no prescription uk entry on the National Center for Biotechnology Information [NCBI] Web site. Similarly, she would like visitors to be able to visualize the chemical compound in the page using a new HTML5 canvas widget she has found on the web that combines data from different chemistry websites.
However the example I find most interesting is the following:
Importing Data: Amy has enriched her band’s web-site to include Google Rich Snippets event information. Google Rich Snippets are used to mark up information for the search engine to use when displaying enhanced search results. Amy also uses some ECMAScript code that she found on the web that automatically extracts the event information from a page and adds an entry into a personal calendar.
Brian finds Amy’s web-site through Google and opens the band’s page. He decides that he wants to go to the next concert. Brian is able to add the details to his calendar by clicking on the link that is automatically generated by the ECMAScript tool. The ECMAScript extracts the RDFa from the web page and places the event into Brian’s personal calendaring software – Google Calendar.
Although all of the use cases listed above provide sample RDFa markup the final example makes use of Google Rich Snippets for which there is a testing tool which illustrates the structure which is visible to Google. I have been using RDFa on my forthcoming events page for a while so using the Rich Snippets testing tool it is useful to see how the structure provided on that page is processed by Google.
The testing tool does point out that “that there is no guarantee that a Rich Snippet will be shown for this page on actual search results“. As described in the Rich Snippets FAQ “Currently, review sites and social networking/people profile sites are eligible. We plan to expand Rich Snippets to other types of content in the future“.
So although there is no guarantee that use of RDFa embedded in HTML pages using Google Rich Snippets for, say, events will ensure that search results for an events hosted on your Web site will provide a structured display of the information like this:
the fact that Google’s Rich Snippets are explicitly mentioned in the RDFa API draft document does seem to suggest commitment from a leading player which has a vested interest in processing structured information in order to improve the searching process.
And of course the “ECMAScript code that [Amy] found on the web that automatically extracts the event information from a page and adds an entry into a personal calendar” suggests that such RDFa information can be processed today without the need for support from Google. Now does anyone know where Amy found this ECMAScript code?