home > news > topic maps lab juggling rdfa for googles 'rich snippets'

close subject identifiers for Topic Maps Lab juggling RDFa for Googles 'Rich Snippets'
  • /documents/juggling_rdfa_google_rich_snippet
Topi-juggling-with-xhtml-rdfa

Topic Maps Lab juggling RDFa for Googles 'Rich Snippets'

Published by {{by}} on {{at}} and updated at {{updated}}.

Abstract:

With Google introducing rich snippets into their search results we had a good reason to enrich our site with RDFa markup thereby semantically anotating our data publicly available.

Google is now starting to not only show short snippets - a sample of a webpage’s content - but also so called Rich Snippets in their search results.

Rich Snippets give users convenient (semantically augmented) summary information about their search results at a glance.

Until now we stored loads of information in our Topic Map for this portal but exporting it in whole to the public would have been no good example of dealing with data privacy :)

So why not make the information which is available publicly anyway a bit easier readable for those machines under us? We did so for topicmapslab.de. And hope that these snippets will be used to improve search results. Here is a small snippet from our view which produces a person’s page. More information about using RDFa markup is available on google or RDFa wiki.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
 "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:v="http://rdf.data-vocabulary.org.html#"
...

You would want to choose a appropriate doctype first and define the prefixes used.


<div class="detailShape" typeof="v:Person">
    <%= image_tag(url_for_file_column(person, "thumbnail", "detail"), "property"=>"v:photo")%>
    <h1 property="v:name"><%=h person.full_name -%></h1>
        <br/><span rel="v:address"><%= t(:"address") + ":" -%><br/>
            <%= render_shape :for => person.address, :shape => "card" -%><br/><br/>
        </span>
...

In your views just explicitly markup the data you want to highlight.

Yes it is as easy as that! From now on any search engine will be able to use your semantically enriched content for a better search.

Authors of this document are

Subject Matter

Topic Maps Lab Community Portal

is a {{project}}.

Portal_sun

A new Topic Maps community portal, which based on Topic Maps technologies.

Visit homepage of Topic Maps Lab ...

 

Topic Maps provides a proven means for data integration scaling to the
web, as well as a core technology for our highly flexible applications
with largely autogenerated frontend structures.

Stekeivevk_1_
Stefan Kesberg
topicWorks Navigator
practical-semantics.com
Topic Maps Lab auf der Cebit 2011
Partners

Graduate from the Topic Maps Lab