W3C home > Mailing lists > Public > public-vocabs@w3.org > October 2011

Re: Referencing consolidated information

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 18 Oct 2011 11:50:57 +0100
Message-Id: <D8AE465A-20C3-4665-A613-3F4DCDD9F173@jenitennison.com>
To: public-vocabs@w3.org

On 18 Oct 2011, at 11:11, Bob Ferris wrote:
> alternatively by utilising RDFa [1] you could probably achieve the intended kind of modelling, see the following example:
> 
> <div xmlns:ex="http://example.org/" xmlns:so="http://schema.org/">
> 	<div about="[ex:author1]" typeof="[so:Person]">
> 		<h1 property="[so:name]">Isaac Asimov</h1>
> 	</div> <!-- person -->	
> 	<div about="[ex:book1]" typeof="[so:Book]">
> 		<div rel="[so:author]" resource="[ex:author1]"></div>
> 		<div property="[so:name]">The Dark Ages</div>
> 	</div> <!-- book -->
> 	<div about="[ex:book2]" typeof="[so:Book]">
> 		<div rel="[so:author]" resource="[ex:author1]"></div>
> 		<div property="[so:name]">The Best of Isaac Asimov</div>
> 	</div> <!-- book -->
> </div> <!-- namespace div (optional) -->
> 
> (I added resource identifier for the person and the two books)
> 
> If you put this snippet into a webpage, you could check the extracted result, e.g., via check.rdfa.info, see [2]. Unfortunately, this doesn't seem to be Rich Snippet friendly, see [3]. Maybe, I did another mistake for not being Rich Snippet conform ;)


Try using RDFa 1.1 Lite (no namespaces) if you want this to be used for Rich Snippets:

<div vocab="http://schema.org/">
	<div about="#asimov" typeof="Person">
		<h1 property="name">Isaac Asimov</h1>
	</div> <!-- person -->	
	<div typeof="Book">
		<div rel="author" resource="#asimov"></div>
		<div property="name">The Dark Ages</div>
	</div> <!-- book -->
	<div typeof="Book">
		<div rel="author" resource="#asimov"></div>
		<div property="name">The Best of Isaac Asimov</div>
	</div> <!-- book -->
</div> <!-- namespace div (optional) -->

(Lot simpler, too.)

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com
Received on Tuesday, 18 October 2011 10:51:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 06:48:56 GMT