Re: Suggestion for Microdata to RDF conversion

The properties in the below example of fn and photo have the RDF-compatible URIs of:

http://microformats.org/profile/hcard#fn


and

http://microformats.org/profile/hcard#photo


respectively. 

They are also loadable references to human/machine readable property definitions. This is by design in XMDP.

Tantek

-----Original Message-----
From: Philip Jägenstedt <philipj@opera.com>
Date: Fri, 22 Jan 2010 21:07:30 
To: <bnowack@semsol.com>; Ian Hickson<ian@hixie.ch>
Cc: Tab Atkins Jr.<jackalmage@gmail.com>; <public-html@w3.org>
Subject: Re: Suggestion for Microdata to RDF conversion

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:50:56 UTC