W3C home > Mailing lists > Public > public-html-data-tf@w3.org > October 2011

Single heuristic mapping for property URIs

From: Toby Inkster <tai@g5n.co.uk>
Date: Wed, 26 Oct 2011 11:53:30 +0100
To: public-html-data-tf@w3.org
Message-ID: <20111026115330.1769c0f9@miranda.g5n.co.uk>
On Tue, 25 Oct 2011 16:49:45 +0100
Toby Inkster <tai@g5n.co.uk> wrote:

> This single (albeit complex) mapping seems to cover
> http://schema.org/, http://microformats.org/profile/hcard,
> http://n.whatwg.org/work, Google Rich Snippets, and most other common
> RDF vocabs including FOAF, SIOC, SKOS, OWL, etc.

I've now implemented this mapping in my Microdata parser. Without
requiring any special knowledge of different Microdata and RDF
vocabularies, or any registry, it "just works". It generates sensible
property URIs for all of the following examples:

	<div itemscope itemtype="http://schema.org/Person">
	  <span itemprop="name">Alice</span>
	  <!-- result: http://schema.org/name -->

	<div itemscope
	  <span itemprop="name">Alice</span>
	  <!-- result: http://schema.org/name -->

	<div itemscope itemtype="http://xmlns.com/foaf/0.1/Person">
	  <span itemprop="name">Alice</span>
	  <!-- result: http://xmlns.com/foaf/0.1/name -->

	<div itemscope itemtype="http://microformats.org/profile/hcard">
	  <span itemprop="fn">Alice</span>
	  <!-- result: http://microformats.org/profile/hcard#fn -->

	<div itemscope itemtype="http://example.com/2011/vocab#Person">
	  <span itemprop="name">Alice</span>
	  <!-- result: http://example.com/2011/vocab#name -->

Source code for a Perl module implementing this is here:


Toby A Inkster
Received on Wednesday, 26 October 2011 10:52:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:08:25 UTC