Re: Suggestion for Microdata to RDF conversion

On Fri, 22 Jan 2010, Benjamin Nowack wrote:
> 
> P.S. as I just saw Ian's comment on IRC[1]:
> 
> This algorithm ignores non-RDF structures such as
> 
>    <div itemscope itemtype="http://example.com/">
>       <span itemprop="a/b"/>
>    </div>
> or
>    <div itemscope itemtype="http://example.com/a/">
>       <span itemprop="b"/>
>    </div>
>
> because common RDF vocabularies simply don't use URI patterns like 
> "http://example.com/" or "http://example.com/a/" to declare resource 
> types.

Given this regexp (from your earlier e-mail):

   /^(.*[\/\#])([^\/\#]+)$/

...I understand that "a/b" wouldn't be usable as a keyword, because the 
regexp's second pattern doesn't match strings with / and # characters. But 
why would the other three types not work?

Into what RDF statements would your proposal turn the above two examples?

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?


> Requiring OWL magic to convert Microdata to its target RDF vocabulary 
> makes Microdata even more complex to understand than RDFa. OWL is well 
> beyond what a Microdata-to-RDF parser writer should need to know.

The parser wouldn't need to know it at all, that's the point. The parser 
can just convert it all into RDF, and then a simple blob of OWL can be 
added to the triple store so that any RDF use of the data will treat the 
microdata-originating properties as equivalent to the more commonly used 
RDF vocabularies'. (After all, if the user didn't intend to use tools that 
leverage the power of RDF, there's really not much point going to the 
trouble to convert everything into RDF in the first place. The user could 
just as easily simply use a JSON-like data structure, which is easier to 
understand and query for most purposes.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 22 January 2010 09:31:32 UTC