Rdfa4google

Introduction

2010-11-02: BREAKING NEWS: Google now officially supports GoodRelations

See http://www.heppresearch.com/gr4google for more information and a recipe

This page will be updated shortly.

old page content:

2010-02-25:If you use the Magento shop software, there is now a free extension to use GoodRelations for SEO automatically.

2009-12-16: Breaking news:It seems that Google is now showing GoodRelations price information in the search results!

2009-12-10:We removed the recipes using XML entity definitions for shortening the mark-up, because that is unlikely to work on a Web scale.

2009-10-30: You can see how your page would look like in Google+GoodRelations using the iGoogr application at http://igoogr.appspot.com/
2009-07-30:Changed all

elements in the RDFa parts to in order to avoid extra blank lines in the rendering of such pages.


On this page, we describe proper patterns that can be used by companies for embedding

  • contact details,
  • opening hours,
  • individual products, and
  • pricing information

in their Web pages using the RDFa syntax and the GoodRelations vocabulary.

While Google has recently announced to consider RDFa meta-data for improved search results, details expressed using the GoodRelations vocabulary is currently not included in the output.

However, there are numerous innovative applications and services that will display GoodRelations meta-data if available.

The current main purpose of this page is

  • to allow Google staff to check that the proposed recipes for such data are compliant with all current Google content policies, and
  • to train Web designers and SEO experts in creating GoodRelations meta-data.


Overview

There are two ways of using RDFa with existing content:

a) Reusing existing text and values at their original position

Example:

...

+49-89-6004-0

...

b) Embedding additional meta-data in the same document, but detached from the human-readable content

Example:

...

Phone: +49-89-6004-0

...

The advantage of a) is that updating the human-readable content means automatically updating the associated meta-data. The downside is that mixing the data level and the presentation level can create complicated mark-up. Also, it is impossible to create generic tools that provide the mark-up for easy copy-and-paste.

The advantage of b) is that it is easy to create generic tools that provide the mark-up for easy copy-and-paste, which will help assist users in creating respective mark-up.

Describing a business and its opening hours

Example 1: Reusing existing text and values at their original position

http://www.heppnetz.de/rdfa4google/company.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<p>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: A Company or Shop</p>

This page is part of a demo of how a small business can feed its contact etc. descriptions into the Web of Linked Data, while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen,

     ``www.unibw.de/ebusiness/``.
   

     ``

     ``
       ``Company Logo
     ``

     

     ``Hepp Space Ventures Inc.``
     
Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example.

     
Address of our main office:
     

         ``1234 Hepp Road``,
         ``85577``
         ``Neubiberg``,
         ``Bavaria``,
         ``Germany``.
       

     Phone: ``+49-89-6004-0``

       ``
       ``
     

     Web: ``www.heppnetz.de``
     

     

           ``
           ``
         

         
          ``Opening Hours: Mon-Fri 10-6, Sat 10-4.30``

             ``
             ``
             

         
          

             ``
             ``
             

           
          

     ``Link to Personal SCSI offer``
   

Example 2: Embedding additional meta-data in the same document, but detached from the human-readable content

http://www.heppnetz.de/rdfa4google/company-tool.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<p>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: A Company or Shop - Machine-based</p>

This page is part of a demo of how a small business can feed its contact etc. descriptions into the Web of Linked Data,

      while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen,

     ``www.unibw.de/ebusiness/``.
   

     ``Company Logo
     

     ``Hepp Space Ventures Inc.``
      Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example.

     
Address of our main office:
      ``1234 Hepp Road``,
     ``85577`` Neubiberg``,
     ``Bavaria``,
     ``Germany``.
      Phone: ``+49-89-6004-0``

     
      Web: ``www.heppnetz.de``

     
Opening Hours: ``Mon-Fri 10-6, Sat 10-4.30``
      ``Link to Personal SCSI offer``
    

     ``

       ``

       ``

       ``

       ``
         ``
           ``
           ``
           ``
           ``
           ``
         ``

       ``

       ``

       ``
         ``
         ``
       ``

       ``

       ``
       ``
         ``

           ``

           ``
             ``
             ``
           ``

           ``

           ``
             ``
               ``
               ``
               ``
               ``
               ``
               ``
               ``
             ``

           ``

           ``
             ``
               ``
               ``
               ``
             ``

           ``

         ``
       ``
     ``
   

Describing a product and its pricing

In the following we show how product details and prices can be embedded as additional meta-data in the same document, but detached from the human-readable conten.

For describing products, this approach is often a lot simpler, because the order and structure of the presentation is often quite different from the underlying data.

The file is available on the Web at

http://www.heppnetz.de/rdfa4google/product.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<p>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: A Product Detail Page</p>

This page is part of a demo of how a small business can feed its product and offer descriptions into the Web of Linked Data,

   while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen,

     ``www.unibw.de/ebusiness/``.
   

     Price: ``34.99 ``USD``
      Product Name:`` Personal SCSI 16-bit SCSI Controller``
     
Description:
     ``This low-cost, high-performance SCSI controller allows you to connect up to
       seven professional mass-storage devices to your computer.``

        EAN/UPC code: ``0000010363780``
        Article number: ``10363780``

     ``Product Image

     
Product Reviews:
     
Average:
     ``4.5``, lowest:
     ``0``, highest:
     ``5`` (total number of reviews:
     ``45``)
      ``Link to the main company page``
      ``Link to the main company page (tool-variant)``
    

     ``

       ``
       ``

       ``

       ``
       ``

       ``

       ``
         ``
         ``
         ``
       ``

       ``
       ``
       ``
         ``
           ``
           ``
           ``
             ``

               ``
               ``
               ``
               ``
               ``

               ``

             ``
               ``
                 ``
                 ``
                 ``
                 ``
               ``

             ``

           ``
         ``
       ``
     ``
   ``
 

Getting less verbose mark-up

As per request by Google, we tried to simplify and shorten the recommended mark-up. This sections gives some examples on how that can be achieved.

Opening Hours in Tabular Form

http://www.heppnetz.de/rdfa4google/openinghours.html

a) XHTML+RDFa

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<p>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: Opening Hours</p>

This page is part of a demo of how a small business can feed its contact etc. descriptions into the Web of Linked Data, while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen,

     ``www.unibw.de/ebusiness/``.
   

     ``
     ``Hepp Space Ventures Inc.``
     
Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example.
     Phone: ``+49-89-6004-0``

       ``
       ``
     

     Web: ``www.heppnetz.de``
     
      

Fort Myers Beach Shop

         


         

Opening Hours:

Mondays

08:00

18:00

Tuesdays

08:00

18:00

Wednesdays

08:00

14:00

Thursdays

08:00

18:00

Fridays

08:00

20:00

Saturdays

09:00

15:00

b) N3

@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xhv: <http://www.w3.org/1999/xhtml/vocab#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .


<http://www.heppnetz.de/rdfa4google/openinghours.html#business> a gr:BusinessEntity ;
     rdfs:label "Hepp Space Ventures Inc."@en ;
     gr:hasPOS <http://www.heppnetz.de/rdfa4google/openinghours.html#myshop> ;
     gr:legalName "Hepp Space Ventures Inc."@en ;
     foaf:page <http://www.heppnetz.de/>, <http://www.heppnetz.de/rdfa4google/openinghours.html> ;
     vcard:fn "Hepp Space Ventures Inc."@en ;
     vcard:geo
         [ vcard:latitude "48.0802626"^^xsd:float ;
             vcard:longitude "11.6407428"^^xsd:float
         ] ;
     vcard:tel "+49-89-6004-0"^^xsd:string ;
     vcard:url <http://www.heppnetz.de/> .

<http://www.heppnetz.de/rdfa4google/openinghours.html#fri> a gr:OpeningHoursSpecification ;
     gr:closes "20:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Friday ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#mon> a gr:OpeningHoursSpecification ;
     gr:closes "18:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Monday ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#myshop> a gr:LocationOfSalesOrServiceProvisioning ;
     gr:hasOpeningHoursSpecification
         <http://www.heppnetz.de/rdfa4google/openinghours.html#fri>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#mon>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#sat>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#thu>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#tue>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#wed> .

<http://www.heppnetz.de/rdfa4google/openinghours.html#sat> a gr:OpeningHoursSpecification ;
     gr:closes "15:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Saturday ;
     gr:opens "09:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#thu> a gr:OpeningHoursSpecification ;
     gr:closes "18:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Thursdays ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#tue> a gr:OpeningHoursSpecification ;
     gr:closes "18:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Tuesday ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#wed> a gr:OpeningHoursSpecification ;
     gr:closes "14:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Wednesday ;
     gr:opens "08:00:00"^^xsd:time .