« Web walls, digital signage and personalized content | Main | New release of the RDFa 1.1 Distiller and Validator »

Schema.org and RDFa 1.1 Lite: how does it look now?

In his latest blog entry on the Schema.org, Dan Brickley announced that Schema.org would also process RDFa 1.1 Lite as an alternative syntax to encode Schema.org terms. As he emphasized:

This work opens up new possibilities also for developers who intend to work with schema.org data using RDF-based tools and Linked Data, and defines a simplified publisher-friendly 'Lite' view of RDFa.

However, one has to be careful about a detail: the RDFa 1.1 version that will be processed is not the latest “official” W3C draft; indeed, as a result of feedback’s and technical discussion, the next release of RDFa 1.1 will include some significant changes. As Dan emphasized in his blog, there are still some technical details to finalize before the Working Group would publish that new draft, but the changed version is already available as an editors’ draft. The most important new feature, as far as the Schema.org examples also go, is the changed behavior of the @property attribute: in the overwhelming percentage of RDFa usage, it becomes synonymous to @rel. (What essentially happens is that, in the presence of, say, an @href attribute, the value of that attribute is bound to @property instead of a possible literal.)

The Schema.org datamodel page has an early example showing some canonical Schema.org use cases in terms of RDFa 1.1. It encodes an earlier version of the example given on the Schema.org Product. Here is how the same example looks like in the new setting, i.e., RDFa 1.1. This example is also in RDFa 1.1 Lite, i.e., the simpler albeit strict subset of RDFa 1.1:

<div vocab="http://schema.org/" typeof="Product">
  <img property="image" src="dell-30in-lcd.jpg" />
  <span property="name">Dell UltraSharp 30" LCD Monitor</span>

  <div property="aggregateRating" typeof="AggregateRating">
    <span property="ratingValue">87</span>
    out of <span property="bestRating">100</span>
    based on <span property="ratingCount">24</span> user ratings
  </div>

  <div property="offers" typeof="AggregateOffer">
	<span property="lowPrice">$1250</span>
	to <span property="highPrice">$1495</span>
	from <span property="offerCount">8</span> sellers
  </div>

  Sellers:
  <div property="offers" typeof="Offer" >
    <a property="url" href="save-a-lot-monitors.com/dell-30.html">
     Save A Lot Monitors - $1250</a>
  </div>
  
  <div property="offers" typeof="http://schema.org/Offer">
    <a property="url" href="jondoe-gadgets.com/dell-30.html">
    Jon Doe's Gadgets - $1350</a>
  </div>
  ...
</div>     

This is clearly significantly simpler than the previous version. Indeed, the compelling reasons for the changes in RDFa 1.1 (compared to its previous versions) was to achieve that simplicity.

If you are interested in some of the technical details… Some of the notable differences, compared to the previous versions of RDFa 1.1 (and also shown on that example) are:

For reference, a portion of the generated RDF is as follows:

@prefix schema: <http://schema.org> .
[ a schema:Product ;
  schema:image <dell-30in-lcd.jpg> ;
  schema:name "Dell UltraSharp 30" LCD Monitor ;
  schema:aggregateRating [
    a schema:AggregateRating ;
    schema:ratingValue "87" ;
    schema:bestRating "100" ;
    schema:ratingCount "24" 
  ] ;
  schema:offers [
    a schema:AggregateOffer ;
    schema:lowPrice "$1250" ;
    schema:highPrice "$1495" ;
    schema:offerCount "8" 
  ] ;
  schema:offers [
    a schema:Offer ;
    schema:url <save-a-lot-monitors.com/dell-30.html> 
  ] ;
  ...
]

Filed by Ivan Herman on November 12, 2011 9:12 AM in HTML, Semantic Web, Technology, Web Applications, Web Design
| | Comments (2) | TrackBacks (3)

Comments

Matti Schneider-Ghibaudo # 2011-11-22

Interesting. One question regarding the example, though:

&lt;div property="offers" typeof="Offer" &gt;
…
&lt;div property="offers" typeof="http://schema.org/Offer"&gt;

Is there any difference / reason for fully qualifying the second <div>?

Thanks for the update :)

Ivan Herman # 2011-11-22

Matti,

yes, there is a reason: my own sloppiness:-)

That being said: the code is correct: RDFa gives you the choice of using full URIs or “terms”, as it is called, ie, names that are concatenated to the vocabulary value to form a full URI. It is up to the author. This means, for example, that authors can also add a type that is not in the main vocabulary using a full URI (“also” because a @typeof attribute may contain several types), but it also works if the author forgets to refer to the vocabulary like I did…

Thanks,

Ivan

Leave a comment

Note: this blog is intended to foster polite on-topic discussions. Comments failing these requirements and spam will not get published. Please, enter your real name and email address. Every individual comment is reviewed by the W3C staff. This may take some time, thank you for your patience.

You can use the following HTML markup (a href, b, i, br/, p, strong, em, ul, ol, li, blockquote, pre) and/or Markdown syntax.

Your comment


About you

This blog is written by W3C staff and working group participants,
 and maintained by Coralie Mercier.
Authorized parties may log in to create a new entry.
Powered by Movable Type, magpierss and a lot of Web Technology