go to content or go to sidebar

RSS Feed

The Web, Naturally!

WebOrganics » » rdfa

  1. Welcome Google to the Semantic Web
    Posted by Martin, about 436 days ago.

    Last week google announced on its webmaster blog something called Rich Snippets which is basically a way of marking up Structured data using microformats or/and RDFa on your web pages.

    Rich Snippets are used to mark up things like Reviews, People, Products, Businesses and organizations that Google will use in its search results pages to give a user a convenient summary of their results at a glance before visiting a web page.

    Wow! for the kind people who have been actively involved in developing and advocating Microformats and RDFa this is really good news and its been a long time coming.

    We have arrived at a new Era of SEO, as Michael Hausenblas (one of the key developers of RDFa) said "Let's call it semantic SEO", I like that, others may call it SEO3.0 or SEO++ whatever its all the same thing, Just SEO to me with more professionalism and intelligence.

    For Search Engine Optimization in particular I agree with Michael, If you use Rich Snippets then you can expect a reduction in Bounce Rates, higher conversion rates, More customers, More Money. There are I think one or two down sides to consider, the popular practice of Back-Link building and Modifying Header tags may over time become less relevant because these very small nuggets of data will have less meaning compared to the data contained in a Rich Snippet.

    A final thought from Jay Myers (one of the developers of the hProduct Microformat)

    ...microformats, RDFa, and related mark-up methods go beyond SEO and Google; they can serve as the front-end to a dynamic, smarter web of linked data. Don't implement microformats as a "silver bullet" for SEO. Implement them because your users deserve better, more concrete data regardless of the path they take to discover your products.

    Well said.

    Comments: 0

  2. Extending hCard using RDFa
    Posted by Martin, about 855 days ago.

    Mark Birbeck the Designer of RDFa has recently posted a couple of really good articles recently one about the first steps in adding Foaf to RDFa and a second one about using RDFa and Microformats. Both these articles has inspired me to write a little introduction about how to use the hcard microformat and extend it using RDFa.

    I am going to mark up this example of a hCard as RDFa:

    <div class="vcard" id="weborganics">
    <p><span class="fn">Martin McEvoy</span></p>
    <p><img alt="weborganics" src="http://weborganics.co.uk/images/me.jpg" class="photo"></p>
    <p>Contact: <a title="Email" class="email" href="mailto:info@weborganics.co.uk">Email</a>
    Web: <a rel="me" class="url" href="http://weborganics.co.uk/index.xhtml">WebOrganics</a></p>
    <div class="geo">
            <abbr title="53.7552" class="latitude">N 53.7552</abbr>,
            <abbr title="-2.3675" class="longitude">W -2.3675</abbr>
    </div>
    </div>

    I have included the geo part of hcard because its useful for people, clients, or customers to know where you are yes?

    First add the RDFa document type to your page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

    So far so good your page is now RDFa and you are ready to add some namespaces, a namespace is just a place where a set of names and definitions is stored.

    I am going to use two namespaces in this example:

    • 1. Foaf, xmlns:foaf="http://xmlns.com/foaf/0.1/"
      Foaf Is primaraly used to define People, FOAF documents are machine-readable home pages.

    • 2. Geo, xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
      Geo Is the RDF equivalent of the World Geodetic System or WGS84 and is used to represent Latitude/Longitude information about the location of things.

    There are two ways to add a namespace in RDFa one is In the <html> tag of your page or another way is in the page using say a <div> or a <span> I am going to add the namespace to the hcard markup itself:

    <div class="vcard" id="weborganics"
                    xmlns:foaf="http://xmlns.com/foaf/0.1/" 
                    typeof="foaf:Person" 
                    about="#weborganics">

    @typeof is similar to a html <div> it describes a block of some thing, in this case Its a block of foaf:Person. @about means exactly as it says what this thing is about in this case Its about the foaf:Person weborganics.

    Lets add a Name to this person:

    <p><span property="foaf:name" class="fn">Martin McEvoy</span></p>

    Easy eh?, Properties are use to add information about the subject, in this case a person, the contents are usually just text.

    Next you may want to add your picture:

    <p rel="foaf:img">
    <img alt="weborganics" src="http://weborganics.co.uk/images/me.jpg" class="photo"/>
    </p>

    @rel is used in the same way as a html rel to describe the relationships between things. The above example has a relationship of a foaf:img of the foaf:Person. In RDFa you can use @rel anywhere in your page not just in links, you may also want to add your email address and homepage url in the same way:

    <p>Contact: <a rel="foaf:mbox" title="Email" class="email" href="mailto:info@weborganics.co.uk">Email</a>
    Web: <a rel="foaf:weblog me" class="url" href="http://weborganics.co.uk/index.xhtml">WebOrganics</a></p>

    You can leave it there if you wanted which is great! but I am going to take this a little further and demonstrate how you can mark up the Geo bit of a hcard. All in one go this time using the same techniques as demonstrated above:

    <div class="geo" id="weblog" rel="foaf:based_near"
            xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
            <span typeof="geo:Point" about="#weblog">
                    <abbr property="geo:lat" content="53.7552" title="53.7552" class="latitude">N 53.7552</abbr>, 
                    <abbr property="geo:long" content="-2.3675" title="-2.3675" class="longitude">W -2.3675</abbr>
            </span>
    </div>

    There Is one thing extra I have added I have used @content this works in the same way as the @title attribute in the abbr design pattern, Its used to carry machine readable data without it interfering with the human content, If you think about that from an accessible point of view its actually better than the current abbr design pattern.

    So there you have it a hCard marked up as RDFa in a few easy steps. I have created two examples to accompany this mini how-to. which you can simply just copy and paste with your own details.

    Microformats and RDFa work pretty well together I think, It adds Scope when previously there wasn't any, Microformats also make excellent building blocks for RDFa they give you hints on where everything should go. Thanks.

    Comments: 0

  3. hAudio RDFa
    Posted by Martin, about 1,072 days ago.

    hAudio has been creating quite a bit of exitement around the semantic web recently in particular the hAudio RDFa maping performed by David Lehn and Manu Sporny of Digital Bazaar, Inc.

    The Creative Commons Tech Blog describes the proposal in its entry about Metadata work of interest as

    ...could turn out to be interesting for describing licensed content on the web, all rather interesting.

    The Proposed hAudio RDFa maping can be found on the Digital Bazaar Wiki http://wiki.digitalbazaar.com/en/HAudio_RDFa a special well done to Manu Sporny because thanks to his efforts in the Microformats community and the RDFa community has become an invited expert in the W3C RDFa task force exellent news for both hAudio and Manu.
    If you want to see a working example of hAudio RDFa as always WebOrganics has Produced an example with one or two tools to work with which can be found at http://weborganics.co.uk/files/hAudio-RDFa.xhtml The example also uses Valid XHTML-RDFa 1.0, something else to talk about at a later date?

    Tags:

    Comments: 0