W3C home > Mailing lists > Public > public-html@w3.org > January 2010

Re: Suggestion for Microdata to RDF conversion

From: Philip Jägenstedt <philipj@opera.com>
Date: Fri, 22 Jan 2010 21:07:30 +0100
To: bnowack@semsol.com, "Ian Hickson" <ian@hixie.ch>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, public-html@w3.org
Message-ID: <op.u6x96sp2sr6mfa@worf>
On Fri, 22 Jan 2010 11:22:50 +0100, Benjamin Nowack <bnowack@semsol.com>  
wrote:

> On 22.01.2010 09:30:58, Ian Hickson wrote:

>> Another example would be:
>>
>>    <div itemscope itemtype="http://example.com/vocab#">
>>       <span itemprop="x"/>
>>       <span itemprop="http://example.com/vocab#x"/>
>>    </div>
>>
>> For sanity, in the microdata model, this has to be two distinct
>> properties. What RDF would your proposal convert the above into?
> Same as above, the itemtype is not an RDF class.
>
> Here is one that'd be RDF:
>
>    <div itemscope itemtype="http://example.com/vocab#Example">
>       <span itemprop="x"/>
>       <span itemprop="http://example.com/vocab#x"/>
>    </div>

How does one identify an RDF class? Is there an RDF class in the below?

<div itemscope itemtype="http://microformats.org/profile/hcard">
   My name is <span itemprop="fn">Alec Tronnick</span>
   <img itemprop="photo" src="mypic.jpg" alt="">
</div>

Unless you intend to whitelist common RDF classes or blacklist common  
microdata item types, it seems to be that the above would generate

_:n a <http://microformats.org/profile/hcard> .
_:n <http://microformats.org/profile/fn> "Alec Tronnick" .
_:n <http://microformats.org/profile/photo> <http://origin/mypic.jpg> .

Which is most definitely not what you want and might be harmful if e.g.  
<http://microformats.org/profile/photo> should be used as a vocabulary  
identifier in the future.

Given that namespace URIs and item types alike are supposed to be opaque  
identifiers (right?), the approach seems rather risky, and I'm surprised  
that it could actually work with most (all?) RDF vocabularies.

-- 
Philip Jägenstedt
Core Developer
Opera Software
Received on Friday, 22 January 2010 20:08:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:13 UTC