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

Fwd: More direct conversion from microdata to RDFa?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 12 Oct 2011 20:25:50 +0100
To: public-html-data-tf@w3.org
Message-Id: <C5FE9478-8EC5-48EC-901C-F045DFCD6428@jenitennison.com>
Of interest to this group, I think, a proposal from Steph (sent to the RDFWAWG) to ease transitioning between microdata and RDFa by interpreting the typeof attribute in RDFa in the same way as the itemtype attribute in microdata.


Begin forwarded message:

> Resent-From: public-rdfa-wg@w3.org
> From: StÚphane Corlosquet <scorlosquet@gmail.com>
> Subject: More direct conversion from microdata to RDFa?
> Date: 12 October 2011 15:56:49 GMT+01:00
> To: public-rdfa-wg@w3.org
> Converting microdata to RDFa could be made easier by bypassing the vocab attribute. Microdata incorporates the concept of vocabulary in the data item type via @itemtype. Coming from a microdata perspective, the concept of vocabulary URI is an extra element (different from the item type) which could be avoided by the following proposal. Since there is a mechanism being designed to infer a vocabulary namespace from the microdata @itemtype, RDFa could use a similar mechanism, and use the first token of @typeof to construct the namespace that we currently put in @vocab.
> Consider the following microdata snippet:
> <div itemscope itemtype="http://schema.org/Person>
>    My name is <span itemprop="name">John Doe</span>.
> </div>
> Currently to convert to RDFa, you need to split @itemtype into two attributes: @vocab and @typeof. What I'm suggesting is a direct mapping from @itemtype to @typeof without the need of @vocab, where @typeof would include the full URI:
> <div typeof="http://schema.org/Person>
>    My name is <span property="name">John Doe</span>.
> </div>
> This would ease the RDFa to microdata and vice versa from a human standpoint.
> Note that I'm not suggesting to drop @vocab, but simply to make it optional, which would make the common microdata snippets a no brainer to convert to RDFa by a simple attributes string replace. In the processing model sequence, step 3 would have to include an extra step for the case where @vocab is missing, and use the same mechanism as Gregg is defining for microdata to RDF conversion. Here is a suggestion:
> [[[
> 3. Next the current element is examined for any change to the default vocabulary via @vocab. If @vocab is present and contains a value, its value updates the local default vocabulary. If the value is empty, then the local default vocabulary must be reset to the Host Language defined default. If @vocab is not present but the first token of @typeof is an absolute URI, construct the local default vocabulary by removing everything following the last SOLIDUS U+002F ("/") or NUMBER SIGN U+0023 ("#") in the first token of @typeof.
> ]]]
> Thoughts?
> Steph.

Jeni Tennison

Received on Wednesday, 12 October 2011 19:26:28 UTC

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