Added Vocabulary Expansion, and updated the schema.org definition to use owl:equivalentProperty semantics for additionalType.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Sun, 22 Jul 2012 16:44:24 -0700
changeset 118 0530f462c8d8
parent 117 8055fc70e571
child 119 9696af1850be
Added Vocabulary Expansion, and updated the schema.org definition to use owl:equivalentProperty semantics for additionalType.
microdata-namespace/ns.json
microdata-rdf/index.html
microdata-supplement/index.html
--- a/microdata-namespace/ns.json	Sun Jul 22 14:41:58 2012 -0700
+++ b/microdata-namespace/ns.json	Sun Jul 22 16:44:24 2012 -0700
@@ -3,6 +3,7 @@
     "propertyURI":    "vocabulary",
     "multipleValues": "unordered",
     "properties": {
+      "additionalType": {"equivalentProperty": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
       "blogPosts": {"multipleValues": "list"},
       "breadcrumb": {"multipleValues": "list"},
       "byArtist": {"multipleValues": "list"},
--- a/microdata-rdf/index.html	Sun Jul 22 14:41:58 2012 -0700
+++ b/microdata-rdf/index.html	Sun Jul 22 16:44:24 2012 -0700
@@ -38,7 +38,8 @@
           // and its maturity status
           previousPublishDate:  "2012-03-08",
           previousMaturity:     "IG-NOTE",
-          //diffTool:             "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
+          previousURI:          "http://www.w3.org/TR/2012/NOTE-microdata-rdf-20120308/",
+          diffTool:             "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
 
           // if there a publicly available Editor's Draft, this is the link
           edDraftURI:           "https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html",
@@ -306,12 +307,12 @@
     provides methods and attributes for retrieving microdata from the HTML DOM.</p>
   <p>For reference, attributes used for specifying and retrieving HTML microdata are referenced here:</p>
   <dl>
-    <dt><dfn class="adef">itemid</a></dt><dd>
+    <dt><dfn class="adef">itemid</dfn></dt><dd>
       An attribute containing a URL used to identify the subject of triples associated with this <a>item</a>.
       (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemid">Items</a></cite>
       in [[!MICRODATA]]).
     </dd>
-    <dt><dfn class="adef">itemprop</a></dt><dd>
+    <dt><dfn class="adef">itemprop</dfn></dt><dd>
       An attribute used to identify one or more <a>name</a>s of an <a>item</a>s. An <a class="aref">itemprop</a>
       contains a space separated list of <dfn>name</dfn>s which may either by <a>absolute URL</a>s or terms
       associated with the type of the <a>item</a> as defined by the referencing <a>item</a>'s
@@ -319,18 +320,18 @@
       (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#names:-the-itemprop-attribute">Items</a></cite>
       in [[!MICRODATA]]).
     </dd>
-    <dt><dfn class="adef">itemref</a></dt><dd>
+    <dt><dfn class="adef">itemref</dfn></dt><dd>
       An additional attribute on an element that references additional elements containing property
       definitions to be applied to the referencing <a>item</a>.
       (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemref">Items</a></cite>
       in [[!MICRODATA]]).
     </dd>
-    <dt><dfn class="adef">itemscope</a></dt><dd>
+    <dt><dfn class="adef">itemscope</dfn></dt><dd>
       An boolean attribute identifying an element as an <a>item</a>.
       (See <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#attr-itemscope">Items</a></cite>
       in [[!MICRODATA]]).
     </dd>
-    <dt><dfn class="adef">itemtype</a></dt><dd>
+    <dt><dfn class="adef">itemtype</dfn></dt><dd>
       An additional attribute on an element used to specify one or more types of an <a>item</a>.
       The <dfn>item type</dfn> of an <a>item</a> is the first value returned from
       <code><cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#dom-itemtype">element.itemType</a></cite></code>
@@ -715,7 +716,7 @@
     support, the <a>registry</a> could be reduced to a simple list of URLs without any further structure necessary.</p>
 </section>
 
-<section>
+<section class="informative">
   <h2>Vocabulary Expansion</h2>
   <p>Microdata requires that all values of <a class="aref">itemtype</a> come from the same vocabulary. This
     is required as <a class="aref">itemprop</a> values are resolved relative to that vocabulary. However,
@@ -727,6 +728,125 @@
     Dublin Core ([[DC11]])).</p>
   <p>Vocabulary Expansion is intended to allow terms to be mixed in from other vocabularies, using
     a mechanism based on that in RDFa Core 1.1 Vocabulary Expansion [[RDFA-CORE]].</p>
+  <p>Vocabulary expansion relies on a very small
+    sub-set of OWL entailment [[!OWL2-OVERVIEW]] to generate triples based on 
+    rules and property relationships described in the <a>registry</a>.
+    Within the <a>registry</a>, a property definition may have either <code>equivalentProperty</code>
+    or <code>subPropertyOf</code> keys having a IRI value of the associated property. Such an
+    entry causes the processor to generate triples associating the source
+    property IRI with the target property IRI using either
+    <code>http://www.w3.org/2000/01/rdf-schema#subPropertyOf</code> or
+    <code>http://www.w3.org/2002/07/owl#equivalentProperty</code> predicates.</p>
+  <p>Vocabulary expansion MAY be performed as
+    part of a larger RDF toolset including, for example, an OWL 2 RL reasoner. 
+    Alternatively, expansion MAY 
+    also be done using a separate and dedicated (e.g., rule based) reasoner 
+    after the triples have been generated, or as the last 
+    processing step.</p>
+  <p>For example, the <a>registry</a> definition for the <em>additionalType</em> property
+    within schema.org, defines <em>additionalType</em> to have an <a>equivalentProperty</a>
+    relationship with <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+{
+  "http://schema.org/": {
+    "properties": {
+      ****"additionalType": {"equivalentProperty": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}****
+    }
+}
+
+<div itemscope itemtype="http://schema.org/Product">
+  <link itemprop="additionalType" href="http://www.productontology.org/id/Laser_printer" />
+  <p itemprop="name">Laser Printer</a>
+</div>	
+-->
+</pre>
+
+  <p>The previous example, indicates a <a>registry</a> rule, which causes the processor to emit
+    an extra triple when first seeing the <code>additionalProperty</code> <a class="aref">itemprop</a>:</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix schema: <http://schema.org/> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+<> md:item (
+  [ a schema:Product;
+    schema:additionalType <http://www.productontology.org/id/Laser_printer> .
+    schema:name "Laser Printer"]
+) .
+
+schema:additionalProperty owl:equivalentProperty rdf:type .
+-->
+</pre>
+
+  <p>After performing OWL2 entailment, an additional <code>rdf:type</code> triple is generated:</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix schema: <http://schema.org/> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+<> md:item (
+  [ a schema:Product, <http://www.productontology.org/id/Laser_printer>;
+    schema:additionalType <http://www.productontology.org/id/Laser_printer> .
+    schema:name "Laser Printer"]
+) .
+
+schema:additionalProperty owl:equivalentProperty rdf:type .
+-->
+</pre>
+
+<section>
+  <h4>Vocabulary Entailment</h4>
+  <p> For the purpose of vocabulary processing, microdata uses a very
+    restricted subset of the OWL vocabulary and is based on the RDF-Based
+      Semantics of OWL [[!OWL2-RDF-BASED-SEMANTICS]].
+    Vocabulary Entailment uses the following terms: </p>
+  <ul>
+    <li><code>rdfs:subPropertyOf</code></li>
+    <li><code>owl:equivalentProperty</code>
+    </li>
+  </ul>
+  <p class="note">Vocabulary Entailment considers only the entailment on individuals
+    (i.e., not on the relationships that can be deduced on the
+    properties or the classes themselves.)
+  </p>
+  <p class="note">While the formal definition of the Entailment
+    refers to the general OWL 2 Semantics, practical implementations may
+    rely on a subset of the OWL 2 RL Profile’s entailment expressed in
+    rules
+    (<cite><a href="http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules">
+      section 4.3</a></cite>
+    of [[!OWL2-PROFILES]]). The
+    relevant rules are, using the rule identifications in
+    <cite><a href="http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules">
+      section 4.3</a></cite>
+    of [[!OWL2-PROFILES]]): <code>prp-spo1</code>, <code>prp-eqp1</code>,
+    and <code>prp-eqp2</code>.</p>
+  <p>The entailment described in this section is the <em>minimum</em>
+    useful level for microdata. Processors may, of course, choose to follow
+    more powerful entailment regimes, e.g., include full RDFS [[!RDF-MT]]
+    or OWL [[!OWL2-OVERVIEW]] entailments. Using those entailments
+    applications may perform datatype validation by checking <code>rdfs:range</code>
+    of a property, or use the advanced facilities offered by, e.g., OWL’s
+    property chains to interlink vocabularies further.</p>
+</section>
+
+<section>
+  <h4>Vocabulary Expansion Control of Microdata Processors</h4>
+  <p> Conforming processors are not required to provide vocabulary expansion. </p>
+  <p> If a processor provides vocabulary expansion, it MUST NOT be
+    performed by default. Instead, the processor MUST provide an option, <code>vocab_expansion</code>,
+    which, when used, instructs the processor to perform a vocabulary
+    expansion as an additional processing step after all other triples have been generated. </p>
+  <p class="note"> Although vocabulary expansion is described in terms of
+    OWL entailment rules, processors
+    are free to use any process which obtains equivalent results.</p>
+</section>
 </section>
 </section>
 
@@ -1037,6 +1157,9 @@
           <dd><em>value</em></dd>
         </dl>
       </li>
+      <li>
+        Optionally, if the processor is invoked with the <code>vocab_expansion</code> option, perform
+        <a href="#vocabulary-entailment">Vocabulary Entailment</a>.</li>
     </ol>
   </section>
 
@@ -1164,6 +1287,30 @@
         and <a>registry</a> has an entry for <a>current vocabulary</a> having a
         <a>propertyURI</a> entry that is not null, set that as <em>scheme</em>. Otherwise,
         set <em>scheme</em> to <code>vocabulary</code>.</li>
+      <li>If the <a>registry</a> entry for <a>propertyURI</a> has an <code>equivalentProperty</code> key,
+        and such a triple has not already been generated, generate the following triple using
+        the <em>value</em> of that key:
+        <dl class="triple">
+          <dt>subject</dt>
+          <dd><em>propertyURI</em></dd>
+          <dt>predicate</dt>
+          <dd><code>http://www.w3.org/2002/07/owl#equivalentProperty</code></dd>
+          <dt>object</dt>
+          <dd><em>value</em></dd>
+        </dl>
+      </li>
+      <li>If the <a>registry</a> entry for <a>propertyURI</a> has an <code>subPropertyOf</code> key,
+        and such a triple has not already been generated, generate the following triple using
+        the <em>value</em> of that key:
+        <dl class="triple">
+          <dt>subject</dt>
+          <dd><em>propertyURI</em></dd>
+          <dt>predicate</dt>
+          <dd><code>http://www.w3.org/2000/01/rdf-schema#subPropertyOf</code></dd>
+          <dt>object</dt>
+          <dd><em>value</em></dd>
+        </dl>
+      </li>
       <li id="scheme-vocab">If <em>scheme</em> is <code>vocabulary</code> return the <a>URI reference</a> constructed
         by appending the <a>fragment-escape</a>d value of <em>name</em> to <a>current vocabulary</a>,
         separated by a U+0023 NUMBER SIGN character (#) unless the <a>current vocabulary</a> ends
@@ -1474,6 +1621,7 @@
       "propertyURI":    "vocabulary",
       "multipleValues": "unordered",
       "properties": {
+        "additionalType": {"equivalentProperty": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
         "blogPosts": {"multipleValues": "list"},
         "breadcrumb": {"multipleValues": "list"},
         "byArtist": {"multipleValues": "list"},
--- a/microdata-supplement/index.html	Sun Jul 22 14:41:58 2012 -0700
+++ b/microdata-supplement/index.html	Sun Jul 22 16:44:24 2012 -0700
@@ -9,105 +9,16 @@
   out in the same tree and use relative links so that they'll work offline,
   -->
 <script type="text/javascript"
-  src="http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js" class="remove">
+  src="http://darobin.github.com/respec/builds/respec-w3c-common-3.1.14.js" class="remove">
  </script>
 <script type="text/javascript" class="remove">
 
     var preProc = {
-          apply:  function(c) {
-                    // extend the bibliography entries
-                    berjon.biblio["MICRODATA-RDF"] = "<cite><a href=\"http://www.w3.org/TR/microdata-rdf/\">Microdata to RDF</a></cite> Gregg Kellogg Editor. World Wide Web Consortium (work in progress). 12 January 2011. This edition of the Microdata to RDF specification is http://www.w3.org/TR/2012/WD-microdata-rdf-20120112/. The <a href=\"http://www.w3.org/TR/2012/WD-microdata-rdf-20120112/\">latest edition of Microdata to RDF</a> is available at http://www.w3.org/TR/microdata-rdf/";
-
-                    // process the document before anything else is done
-                    var refs = document.querySelectorAll('adef') ;
-                    var adefs = [];
-                    for (var i = 0; i < refs.length; i++) {
-                        var item = refs[i];
-                        var p = item.parentNode ;
-                        var con = item.innerHTML ;
-                        var sp = document.createElement( 'dfn' ) ;
-                        var tit = item.getAttribute('title') ;
-                        if (!tit) {
-                            tit = con;
-                        }
-
-                        if ( adefs[tit]) {
-                          throw "Duplicate definition of attribute '" + tit + "'" ;
-                        }
-                        adefs[tit] = sp ;
-
-                        sp.className = 'adef' ;
-                        sp.title=tit ;
-                        sp.innerHTML = con ;
-                        p.replaceChild(sp, item) ;
-                    }
-                    refs = document.querySelectorAll('aref') ;
-                    for (var i = 0; i < refs.length; i++) {
-                        var item = refs[i];
-                        var p = item.parentNode ;
-                        var con = item.innerHTML ;
-                        var sp = document.createElement( 'a' ) ;
-                        if ( !adefs[con]) {
-                          throw "Reference to undefined attribute '" + con + "'" ;
-                        }
-                        sp.className = 'aref' ;
-                        sp.setAttribute('title', con);
-                        sp.innerHTML = '@'+con ;
-                        p.replaceChild(sp, item) ;
-                    }
-                    // now do terms
-                    refs = document.querySelectorAll('tdef') ;
-                    var tdefs = [];
-                    for (var i = 0; i < refs.length; i++) {
-                        var item = refs[i];
-                        if (!item) continue ;
-                        var p = item.parentNode ;
-                        var con = item.innerHTML ;
-                        var ref = item.getAttribute('title') ;
-                        if (!ref) {
-                            ref = item.textContent ;
-                        }
-                        if (ref) {
-                            ref = ref.replace(/\s+/g, '_').toLowerCase() ;
-                        }
-
-                        if ( tdefs[ref]) {
-                          throw "Duplicate definition of term '" + ref + "'" ;
-                        }
-
-                        var sp = document.createElement( 'dfn' ) ;
-                        tdefs[ref] = sp ;
-                        sp.title = ref ;
-                        sp.innerHTML = con ;
-                        p.replaceChild(sp, item) ;
-                    }
-                    // now term references
-                    refs = document.querySelectorAll('tref') ;
-                    for (var i = 0; i < refs.length; i++) {
-                        var item = refs[i];
-                        if (!item) continue ;
-                        var p = item.parentNode ;
-                        var con = item.innerHTML ;
-                        var ref = item.getAttribute('title') ;
-                        if (!ref) {
-                            ref = item.textContent ;
-                        }
-                        if (ref) {
-                            ref = ref.replace(/\s+/g, '_').toLowerCase() ;
-                        }
-
-                        if ( !tdefs[ref]) {
-                          throw "Reference to undefined term '" + ref + "'" ;
-                        }
-                        var sp = document.createElement( 'a' ) ;
-                        var id = item.textContent ;
-                        sp.className = 'tref' ;
-                        sp.title = ref ;
-                        sp.innerHTML = con ;
-                        p.replaceChild(sp, item) ;
-                    }
-                }
-        } ;
+        apply:  function(c) {
+            // extend the bibliography entries
+            berjon.biblio["MICRODATA-RDF"] = "<cite><a href=\"http://www.w3.org/TR/microdata-rdf/\">Microdata to RDF</a></cite> Gregg Kellogg Editor. W3C Note. 08 March 2012. This edition of the Microdata to RDF specification is http://www.w3.org/TR/2012/NOTE-microdata-rdf-20120308/. The <a href=\"http://www.w3.org/TR/microdata-rdf/\">latest edition of Microdata to RDF</a> is available at http://www.w3.org/TR/microdata-rdf/";
+          }
+      } ;
 
 
       var respecConfig = {
@@ -126,12 +37,6 @@
           // if this is a LCWD, uncomment and set the end of its review period
           // lcEnd: "2009-08-05",
 
-          // if you want to have extra CSS, append them to this list
-          // it is recommended that the respec.css stylesheet be kept
-          extraCSS:             [
-              "http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"
-          ],
-
           // editors, add as many as you like
           // only "name" is required
           editors:  [
@@ -146,7 +51,7 @@
           //authors:  [],
 
           // name of the WG
-          wg:           "HTML Data Task Force, Semantic Web Interest Group",
+          wg:           "Semantic Web Interest Group",
 
           // URI of the public WG page
           wgURI:        "http://www.w3.org/2001/sw/interest/",
@@ -165,39 +70,22 @@
           //alternateFormats: [ {uri: "diff-20111118.html", label: "diff to previous version"} ],
       };
 
+      function _esc(s) {
+          s = s.replace(/&/g,'&amp;');
+          s = s.replace(/>/g,'&gt;');
+          s = s.replace(/"/g,'&quot;');
+          s = s.replace(/</g,'&lt;');
+          return s;
+      }
+
       function updateExample(doc, content) {
         // perform transformations to make it render and prettier
         content = content.replace(/<!--/, '');
         content = content.replace(/-->/, '');
-        content = doc._esc(content);
+        content = _esc(content);
         content = content.replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '<span class="diff">$1</span>') ;
         return content ;
       }
-
-      function updateDTD(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
-        content = content.replace(/!ENTITY % ([^ \t\r\n]*)/g, '!ENTITY <span class="entity">% $1</span>');
-        content = content.replace(/!ELEMENT ([^ \t$]*)/mg, '!ELEMENT <span class="element">$1</span>');
-        return content;
-      }
-
-      function updateSchema(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
-        content = content.replace(/&lt;xs:element\s+name=&quot;([^&]*)&quot;/g, '&lt;xs:element name="<span class="element" id="schema_element_$1">$1</span>"') ;
-        return content;
-      }
-
-      function updateTTL(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="sh_sourceCode">' + doc._esc(content) + '</pre>';
-        content = content.replace(/@prefix/g, '<span class="sh_keyword">@prefix</span>');
-        return content;
-      }
   </script>
 <style type="text/css">
 .diff { font-weight:bold; color:#0a3; }
@@ -212,17 +100,6 @@
 dl.triple dt, dl.triple dd { margin: 0; display: inline }
 dl.triple dt:after { content: ':'; }
 dl.triple dd:after { content: '\A'; white-space: pre; }
-.adef { 
-	font-family: monospace; 
-	font-weight: bold; 
-    color: #ff4500 !important;
-}
-
-.aref { 
-	font-family: monospace; 
-	font-weight: bold; 
-    color: #ff4500 !important;
-}
 
 span.entity { color: red; }
 
@@ -258,6 +135,7 @@
       "propertyURI":    "vocabulary",
       "multipleValues": "unordered",
       "properties": {
+        "additionalType": {"equivalentProperty": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
         "blogPosts": {"multipleValues": "list"},
         "breadcrumb": {"multipleValues": "list"},
         "byArtist": {"multipleValues": "list"},