GoodRelationsMicroData

From Wiki of the E-Business and Web Science Research Group
Jump to: navigation, search
gr_banner_small.png
GoodRelations is a standardized vocabulary for product, price, and company data that can be embedded into existing static and dynamic Web pages.

Project Main Page
Vocabulary
Documentation
Developer's Wiki
GoodRelations Cookbook

The preferred syntax for publishing GoodRelations rich meta-data on products, companies, and offers are RDFa or RDF/XML. Recently, the HTML5 Microdata Specification has become available and provides an additional syntax that may have advantages in HTML4 and HTML5 mark-up. While RDFa works with most HTML5 markup, it's most suited for XHTML 1.x code, because the "lazy parsing" mode required for extracting RDF from RDFa embedded in HTML that is not well-formed can return invalid meta-data.

On this page, we will show some experiments on using GoodRelations in HTML5 Microdata syntax.

Important Note: The status of Microdata is still unclear, the tool support is weak and alpha stage. At this point, it is strongly recommended to use the official W3C RDFa syntax for embedding GoodRelations rich meta-data into non-toy projects.

Examples

<xml> <section itemscope itemid="http://www.heppnetz.de/searchmonkey/#business" itemtype="http://purl.org/goodrelations/v1#BusinessEntity" >

Hepp Space Ventures

Your preferred supplier for space adventures.

<a itemprop="http://purl.org/goodrelations/v1#offers" href="http://www.heppnetz.de/searchmonkey/#myoffer">Hot deal: 16-bit SCSI Controller</a>

</section>

</xml>

Using http://foolip.org/microdatajs/live/, one can extract proper RDF in Turtle:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<http://www.heppnetz.de/searchmonkey/#business>
  rdf:type <http://purl.org/goodrelations/v1#BusinessEntity> ;
  <http://purl.org/goodrelations/v1#legalName> "Hepp Space Ventures" ;
  <http://www.w3.org/2000/01/rdf-schema#comment> "Your preferred supplier for space adventures." ;
  <http://purl.org/goodrelations/v1#offers> <http://www.heppnetz.de/searchmonkey/#myoffer> .



Tools

Limitations

  • missing support for datatypes(?)
    • could maybe be inferred from the GoodRelations range specifications by simple heuristics
  • no CURIEs for predicates(?)

Resources