schemaorg_and_rdfa_11_lite_how.html 16.4 KB
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css" media="all">
    @import "/QA/2006/01/blogstyle.css";
    </style>
    <meta name="keywords" content='' />
    <meta name="description" content=" 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..." />
    <meta name="revision" content="$Id: schemaorg_and_rdfa_11_lite_how.html,v 1.15 2011/12/16 03:00:32 gerald Exp $" />    
   <link rel="alternate" type="application/atom+xml" title="Atom" href="http://www.w3.org/QA/atom.xml" />
   <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="http://www.w3.org/QA/news.rss" />   
   <title>Schema.org and RDFa 1.1 Lite: how does it look now? - W3C Blog</title>

   <link rel="start" href="http://www.w3.org/QA/" title="Home" />
   <link rel="prev" href="http://www.w3.org/QA/2011/11/web_walls_digital_signage_and.html" title="Web walls, digital signage and personalized content" />
   <link rel="next" href="http://www.w3.org/QA/2011/11/new_release_of_the_rdfa_11_dis.html" title="New release of the RDFa 1.1 Distiller and Validator " />

   <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about="http://www.w3.org/QA/2011/11/schemaorg_and_rdfa_11_lite_how.html"
    trackback:ping="http://www.w3.org/QA/sununga/mt-tb.cgi/440"
    dc:title="Schema.org and RDFa 1.1 Lite: how does it look now?"
    dc:identifier="http://www.w3.org/QA/2011/11/schemaorg_and_rdfa_11_lite_how.html"
    dc:subject="Technology"
    dc:description=" 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..."
    dc:creator="Ivan Herman"
    dc:date="2011-11-12T09:12:30+00:00" />
</rdf:RDF>
-->

    <!-- <script type="text/javascript" src="http://www.w3.org/QA/mt.js"></script>-->

</head>
<body class="layout-one-column">
      <div id="banner">
      <h1 id="title">
	<a href="http://www.w3.org/"><img height="48" alt="W3C" id="logo" src="http://www.w3.org/Icons/WWW/w3c_home_nb" /></a>
W3C Blog
</h1>
    </div>
    
    <ul class="navbar" id="menu">
        <li><strong><a href="/QA/" title="W3C Blog Home">[ W3C Blog ]</a></strong></li>
        <li><a href="/QA/Library/" title="Documents and Publications on Web and Quality">Documents</a></li>
        <li><a href="/QA/Tools/" accesskey="3" title="Validators and other Tools">Tools</a></li>
        <li><a href="/2007/12/qa-blog-help/index#feedback">Feedback</a></li>
    </ul>
<div id="searchbox">
<form method="get" action="http://www.google.com/custom" enctype="application/x-www-form-urlencoded">
<p id="formbox"><input type="text" size="15" class="textfield" name="q" accesskey="E" maxlength="255" /> <input type="submit" class="submitfield" value="Search" id="goButton" name="sa" accesskey="G" /> <input type="hidden" name="cof" value="T:black;LW:72;ALC:#ff3300;L:http://www.w3.org/Icons/w3c_home;LC:#000099;LH:48;BGC:white;AH:left;VLC:#660066;GL:0;AWFID:0b9847e42caf283e;" /><input type="hidden" id="searchW3C" name="sitesearch" checked="checked" value="www.w3.org/QA" /><input type="hidden" name="domains" value="www.w3.org/QA" /></p>
</form>
</div>


    <div id="main"><!-- This DIV encapsulates everything in this page - necessary for the positioning -->

                     <p class="content-nav">
                        <a href="http://www.w3.org/QA/2011/11/web_walls_digital_signage_and.html">&laquo; Web walls, digital signage and personalized content</a> |
                        <a href="http://www.w3.org/QA/">Main</a>
                        | <a href="http://www.w3.org/QA/2011/11/new_release_of_the_rdfa_11_dis.html">New release of the RDFa 1.1 Distiller and Validator  &raquo;</a>
                     </p>

                        <h2 class="entry-header">Schema.org and RDFa 1.1 Lite: how does it look now?</h2>
                           <div class="entry-body">
                                  <p>In his latest <a href="http://blog.schema.org/2011/11/using-rdfa-11-lite-with-schemaorg.html">blog entry on the Schema.org</a>, 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:</p>
    <blockquote>This work opens up new possibilities also for developers
      who intend to work with schema.org data using RDF-based tools and
      <a href="http://en.wikipedia.org/wiki/Linked_Data">Linked Data</a>,
      and defines a simplified publisher-friendly 'Lite' view of RDFa.</blockquote>
    <p> However, one has to be careful about a detail: the RDFa 1.1
      version that will be processed is <span style="font-style: italic;">not</span>
      the latest <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331/">“official” W3C draft</a>; 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 <a href="http://www.w3.org/2010/02/rdfa/sources/rdfa-core/Overview-src.html">editors’ draft</a>. The most important new feature, as far as the
      Schema.org examples also go, is the changed behavior of the <code>@property</code>
      attribute: in the overwhelming percentage of RDFa usage, it
      becomes synonymous to <code>@rel</code>. (What essentially
      happens is that, in the presence of, say, an <code>@href</code>
      attribute, the value of that attribute is bound to <code>@property</code>
      instead of a possible literal.)</p>
    <p>The <a href="http://schema.org/docs/datamodel.html">Schema.org
        datamodel</a> 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 <a href="http://schema.org/Product">Schema.org Product</a>. Here is how the same example looks like in the
      new setting, i.e., RDFa 1.1. This example is also in <a href="http://www.w3.org/2010/02/rdfa/sources/rdfa-lite/Overview-src.html">RDFa 1.1 Lite</a>, i.e., the simpler albeit strict subset of RDFa 1.1: </p>
    <pre>&lt;div vocab="http://schema.org/" typeof="Product"&gt;
  &lt;img property="image" src="dell-30in-lcd.jpg" /&gt;
  &lt;span property="name"&gt;Dell UltraSharp 30" LCD Monitor&lt;/span&gt;

  &lt;div property="aggregateRating" typeof="AggregateRating"&gt;
    &lt;span property="ratingValue"&gt;87&lt;/span&gt;
    out of &lt;span property="bestRating"&gt;100&lt;/span&gt;
    based on &lt;span property="ratingCount"&gt;24&lt;/span&gt; user ratings
  &lt;/div&gt;

  &lt;div property="offers" typeof="AggregateOffer"&gt;
	&lt;span property="lowPrice"&gt;$1250&lt;/span&gt;
	to &lt;span property="highPrice"&gt;$1495&lt;/span&gt;
	from &lt;span property="offerCount"&gt;8&lt;/span&gt; sellers
  &lt;/div&gt;

  Sellers:
  &lt;div property="offers" typeof="Offer" &gt;
    &lt;a property="url" href="save-a-lot-monitors.com/dell-30.html"&gt;
     Save A Lot Monitors - $1250&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div property="offers" typeof="http://schema.org/Offer"&gt;
    &lt;a property="url" href="jondoe-gadgets.com/dell-30.html"&gt;
    Jon Doe's Gadgets - $1350&lt;/a&gt;
  &lt;/div&gt;
  ...
&lt;/div&gt;     </pre>
    <p>This is clearly significantly simpler than the <a href="http://schema.org/docs/datamodel.html">previous version</a>. Indeed, the compelling reasons for the changes in RDFa 1.1 (compared to its previous versions) was to achieve that simplicity. </p>
    <p>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:</p>
    <ul>
      <li>The behavior of <code>@property</code> has become richer. For
        example, when used on the <code>&lt;img&gt;</code>
        element, it results in a triple with an IRI reference as a
        subject, rather than a literal. This was (and still is!) the
        behavior of <code>@rel</code> but, in this case, <code>@property</code>
        can also be used with a similar result. (That is also the reason why <code>@rel</code> is not used in RDFa 1.1 Lite any more.)</li>
      <li>The combination of <code>@property</code> and <code>@typeof</code>
        has also changed. <code>@typeof</code> generates a new blank
        node (<code></code>it had a similar effect in RDFa 1.0 as well
        as in the earlier versions of RDFa 1.1, although some of the
        details have changed) but, and that is a new
        feature, this blank node is also used as an object for <code>@property</code>
        (again, instead of generating a literal). One could consider
        this combination as a shorthand for an extra <code>@resource</code> or <code>@href</code>
        attribute using a (new) blank node identifier. </li>
      <li>Another feature bound to the combination of <code>@property</code> and <code>@typeof</code>:
        the generated blank node “chains”, i.e., is used as a subject
        for subsequent triples in the sub-tree. This makes a very
        frequent idiom (repeated several times in the example) simpler
        than before. </li>
    </ul>
    <p>For reference, a portion of the generated RDF is as follows:</p>
    <pre>@prefix schema: &lt;http://schema.org&gt; .
[ a schema:Product ;
  schema:image &lt;dell-30in-lcd.jpg&gt; ;
  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 &lt;save-a-lot-monitors.com/dell-30.html&gt; 
  ] ;
  ...
]
</pre>

                           </div>
                           <div id="more" class="entry-more">
                              
                           </div>
                       <p class="postinfo">Filed by <a href="http://www.w3.org/People/Ivan">Ivan Herman</a> on November 12, 2011  9:12 AM in <a href="http://www.w3.org/QA/archive/technology/html/">HTML</a>, <a href="http://www.w3.org/QA/archive/technology/semantic_web/">Semantic Web</a>, <a href="http://www.w3.org/QA/archive/technology/">Technology</a>, <a href="http://www.w3.org/QA/archive/technology/web_applications_1/">Web Applications</a>, <a href="http://www.w3.org/QA/archive/technology/web_design/">Web Design</a><br />
<span class="separator">|</span> <a class="permalink" href="http://www.w3.org/QA/2011/11/schemaorg_and_rdfa_11_lite_how.html">Permalink</a>
                                 | <a href="http://www.w3.org/QA/2011/11/schemaorg_and_rdfa_11_lite_how.html#comments">Comments (2)</a>
                                 | <a href="http://www.w3.org/QA/2011/11/schemaorg_and_rdfa_11_lite_how.html#trackback">TrackBacks (3)</a>
</p>



<h3 class="comments-header" id="comments">Comments</h3>
<div class="comment" id="comment-830075">
<p class="comment-meta" id="c830075">
<span class="comment-meta-author"><strong>Matti Schneider-Ghibaudo </strong></span>
<span class="comment-meta-date"><a href="#c830075">#</a> 2011-11-22</span>
</p>
<div class="comment-bulk">
<p>Interesting. One question regarding the example, though:</p>

<pre>&amp;lt;div property="offers" typeof="Offer" &amp;gt;

&amp;lt;div property="offers" typeof="http://schema.org/Offer"&amp;gt;
</pre>

<p>Is there any difference / reason for fully qualifying the second &lt;div&gt;?</p>

<p>Thanks for the update  :)</p>

</div>
</div>


<div class="comment" id="comment-830387">
<p class="comment-meta" id="c830387">
<span class="comment-meta-author"><strong>Ivan Herman </strong></span>
<span class="comment-meta-date"><a href="#c830387">#</a> 2011-11-22</span>
</p>
<div class="comment-bulk">
<p>Matti,</p>

<p>yes, there is a reason: my own sloppiness:-) </p>

<p>That being said: the code <em>is</em> 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…</p>

<p>Thanks,</p>

<p>Ivan</p>

</div>
</div>



  <div class="comments-open" id="comments-open">
<h3 class="comments-open-header">Leave a comment</h3>

<div class="comments-open-moderated">
   <p>
   Note: this blog is intended to foster <strong>polite
   on-topic discussions</strong>. 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.
   </p>
   <p>
   You can use the following HTML markup (a href, b, i, 
   br/, p, strong, em, ul, ol, li, blockquote, pre) 
   and/or <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a>.</p>
</div>

<div id="comments-open-data">
<form method="post" action="http://www.w3.org/QA/sununga/beach.pl" id="comments-form">
<h4>Your comment</h4>
<div id="comments-open-text">
  <textarea id="comment-text" name="text" rows="20" cols="100"></textarea><br />
<label for="comment-text">Write your comment text here. Remember, keep the discussion on topic and courteous.</label>
</div>

<h4>About you</h4>
<div id="comment-form-name">
  <input type="hidden" name="static" value="1" />
<input type="hidden" name="entry_id" value="9256" />
<input type="hidden" name="__lang" value="en" /> 
<label for="comment-author">Your Name</label>
<input id="comment-author" name="author" size="30" value="" />
</div>
<div id="comment-form-email">
<label for="comment-email">Your Email Address</label>
<input id="comment-email" name="email" size="30" value="" />
</div>

<div id="comments-open-footer">
<input type="submit" accesskey="s" name="post" id="comment-submit" value="Submit" />

</div>
</form>
</div>
</div>



<p id="gentime">This page was last generated on $Date: 2011/12/16 03:00:32 $</p> 

      </div><!-- End of "main" DIV. -->

<address>

This blog is written by W3C staff and working group participants,<br />
&nbsp;and maintained by <a href="/People/CMercier/">Coralie Mercier</a>.<br />
Authorized parties may <a href="/QA/new">log in</a> to create a new entry.<br/>
<span id="poweredby">Powered by Movable Type, magpierss and a lot of Web Technology</span>
    </address>


    
    <p class="copyright">
      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2011
      <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>&reg;
      (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
      <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
      <a href="http://www.keio.ac.jp/">Keio</a>),
      All Rights Reserved.
      W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
      <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
      and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
      rules apply. Your interactions with this site are in accordance
      with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and
      <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy
      statements.
    </p>

  </body>
</html>