120 likes | 129 Vues
Learn how RDFa enhances HTML content with triple data, making it easier to produce, use, and integrate with existing tools. Explore its benefits over RDF/XML, N-triples, and Microformats.
E N D
Why RDFa? http://www.techpresentations.org/Why_RDFa? Sergey Chernyshev some slides fromYaron Koren’s “Introduction to RDFa” SWNYC MeetupNovember 20th, 2008
Status W3C recommendation since October 14, 2008: http://www.w3.org/TR/rdfa-syntax/ First proposed in 2004
How RDFa works Joe Semantic's personal information I work as a programmer at MegaCorp - you can contact me at js@megacorp.com, or by phone at (101) 010-1010.
HTML source <html> <head> <title>Joe Programmer's contact info</title> <base href="http://joeprogrammer.com/contact-info.html" /> </head> <body> <h1>Joe Semantic's personal information</h1> <p>I work as a programmer at <a href="http://megacorp.com">MegaCorp</a> - you can contact me at <a href="mailto:js@megacorp.com">js@megacorp.com</a>, or by phone at (101)010-1010.</p> </body> </html>
RDF / XML <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#"> <rdf:Description rdf:about="http://joesemantic.com/contact-info.html"> <contact:title xml:lang="en">programmer</contact:title> <contact:org rdf:resource="http://megacorp.com"/> <contact:email rdf:resource="js@megacorp.com"/> <contact:tel xml:lang="en">(101) 010-1010</contact:tel> </rdf:Description> </rdf:RDF>
<html xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#"> <head> <title>Joe Semantic's personal information</title> <base href="http://joesemantic.com/contact-info.html" /> </head> <body> <h1>Joe Semantic's personal information</h1> <p>I work as a <span property=”contact:title”>programmer</span> at <a rel="contact:org“ href="http://megacorp.com">MegaCorp</a> - you can contact me at <a rel="contact:email“ href="mailto:js@megacorp.com"> js@megacorp.com</a>, or by phone at <span property=”contact:tel”>(101)010-1010</span>. </p> </body> </html>
Three main keywords in RDFa <a rel=”predicate” href=”object”>...</a> ...defines a linked triple <span property=”predicate”>object</span> ...defines an unlinked triple (literal) <span about=”subject”>...</span> ...creates a subject for triples
Creating subjects ... I'm currently reading <span about=”urn:ISBN:0-596-00027-8”> <span property="dc:title">Programming Perl</span> by <span property="dc:creator">Larry Wall</span> </span>. ...
Easier to produce • Much easier then RDF/XML or N-triples • Almost as easy as Microformats • Easy to integrate with existing publishing tools – just change your HTML templates
Easy to use • Probably first to be adopted by conventional search engines because they already crawl HTML(Yahoo! Search Monkey) • Can be used with JavaScript (http://www.w3.org/2006/07/SWD/RDFa/impl/js/) • Easy to integrate into current “web page” paradigm and workflow(CC license link at http://ben.adida.net/)
Links • RDFa.infohttp://rdfa.info/ • RDFa primerhttp://www.w3.org/TR/xhtml-rdfa-primer/ • Yahoo! Search Monkeyhttp://developer.yahoo.com/searchmonkey • [*shameless plug*] My Semantic Profilehttp://www.sergeychernyshev.com/profile/