Re: @itemref functionality wrt itemtype context

Hi Stéphane,

yes, this is _exactly_ my point. 

Merci!

Ivan

On Sep 1, 2011, at 21:04 , Stéphane Corlosquet wrote:

> Today during the call Ivan raised a concern about @itemref when it is used to associate several items to the same set of properties. His concern was that these properties would possibly inherit different @itemtype contexts.
> 
> Here is a first snippet describing a movie and an article using different vocabularies:
> 
> <div itemscope itemtype="http://schema.org/Movie" itemref="license">
> <p itemprop="name">Pirates of the Carribean: On Stranger Tides (2011)</p>
> </div>
> <div itemscope itemtype="http://rdfs.org/sioc/ns#Post" itemref="license">
>   <span itemprop="name">How to Tie a Reef Knot</span>
>   by <span itemprop="author">John Doe</span>
> </div>
> <footer>
>  <p id="license">All content licensed under the <a itemprop="license"
>  href="http://www.opensource.org/licenses/mit-license.php">MIT
>  license</a>.</p>
> </footer>
> 
> Even though there is no official RDF conversion for microdata yet, I used Gregg's RDF distiller [1] to convert to RDF. The following property URIs were generated for the @itemprop license token:
> http://rdfs.org/sioc/ns#license
> http://schema.org/license
> 
> Another example:
> 
> <div>
>   <div itemscope itemtype="http://xmlns.com/foaf/0.1/Person" itemref="a"></div>
>   <div itemscope itemtype="http://schema.org/Person" itemref="a"></div>
>   <p id="a">Name: <span itemprop="name">Amanda</span></p>
> </div>
> 
> which yields:
> http://xmlns.com/foaf/0.1/name
> http://schema.org/name
> 
> Microdata does not care much about full URIs for properties, and uses the tokens as is in the JSON output (I guess it's up to the application consuming the data to check if a given property name makes sense in the context of its type, but I guess most won't check that). This can be cumbersome for the conversion to RDF where a namespace is required to build a proper URI for the property. Here's another use case which I didn't include in the example above: @itemtype is optional in microdata, so if it is omitted, there is no source to infer a namespace from during the conversion to RDF. 
> 
> @Ivan, does that illustrate all of your points re @itemref?
> 
> Steph.


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 2 September 2011 07:03:29 UTC