Added base property URI generation scheme.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Fri, 04 Nov 2011 22:39:13 -0700
changeset 14 2f11ba803758
parent 13 6156a9cbd997
child 15 29b7fa945ee8
Added base property URI generation scheme.
microdata-rdf/index.html
--- a/microdata-rdf/index.html	Fri Nov 04 22:11:57 2011 -0700
+++ b/microdata-rdf/index.html	Fri Nov 04 22:39:13 2011 -0700
@@ -255,7 +255,7 @@
 <section>
   <h1>Introduction</h1>
   <p>
-    This document describes a means of transforming HTML containing Microdata into RDF. HTML Microdata [[!MICRODATA]]
+    This document describes a means of transforming HTML containing microdata into RDF. HTML Microdata [[!MICRODATA]]
     is an extension to HTML used to embed machine-readable data to HTML documents. This specification describes
     transformation directly to RDF [[RDF-CONCEPTS]].
   </p>
@@ -263,12 +263,12 @@
 <section>
   <h2>Background</h2>
   <p>Microdata is a way of expressing metadata in HTML documents using attributes. A previous version
-    of Microdata [[!MICRODATA]] included rules for generating RDF, but current Editor's Drafts have removed
+    of microdata [[!MICRODATA]] included rules for generating RDF, but current Editor's Drafts have removed
     the explicit transformation procedure. Microdata is now used as an API to access data from within
     an HTML DOM and as a JSON serialization.</p>
   <p>The original RDF transformation process created URIs for properties that are expressed as non-absolute
     URIs. The algorithm was designed to create URIs which were distinct based on the relationship between
-    <aref>itemtype</aref> and <aref>itemprop</aref> contexts. This is required, as the Microdata data model
+    <aref>itemtype</aref> and <aref>itemprop</aref> contexts. This is required, as the microdata data model
     requires that properties maintain distinct semantic meanings in different contexts. However, this
     form of URI generation is typically different than that used within RDF vocabularies, where
     properties typically have a common meaning within a given <tref>vocabulary</tref>.</p>
@@ -286,22 +286,22 @@
 
 <section>
   <h2>Use Cases</h2>
-  <p>During the period of the task force, a number of use cases were put forth for the use of Microdata
+  <p>During the period of the task force, a number of use cases were put forth for the use of microdata
     in generating RDF:</p>
   <ul>
     <li>Semantic search engines such as <a href="http://sindice.com/">Sindice</a> use RDF as their backend data model.
       They want to gather information expressed using microdata alongside information expressed in RDF-based formats
       and make it available to others to use, as a service. In these cases, the ultimate consumer, who will need to
       understand the vocabularies used within the microdata, is the program or person who pulls out data from Sindice.
-      Sindice needs to retain the distinctions in the original Microdata (e.g. ordering of items) and might not have
+      Sindice needs to retain the distinctions in the original microdata (e.g. ordering of items) and might not have
       built-in knowledge about the <tref>vocabulary</tref> of interest to the ultimate consumer. In this case, the ultimate consumer
       is likely to have to map/validate/handle errors in the data they get from Sindice.</li>
     <li>A consumer such as <a href="http://openelectiondata.org">openelectiondata.org</a> wants to support
-      Microdata-based markup of their <tref>vocabulary</tref> as well as RDFa-based markup, both going into an RDF-based data store.
+      microdata-based markup of their <tref>vocabulary</tref> as well as RDFa-based markup, both going into an RDF-based data store.
       They want to use an off-the-shelf tool to extract the microdata. They want to configure the tool to give them the
       RDF that is appropriate for their known <tref>vocabulary</tref>.</li>
     <li>A browser plugin that captures data for the user uses an RDF model as its backend store.
-      Any time it encounters Microdata on a page, it wants to pull that Microdata into the store on the fly.</li>
+      Any time it encounters microdata on a page, it wants to pull that microdata into the store on the fly.</li>
     <li><a href="http://purl.org/goodrelations/">GoodRelations</a> require properties to be generated
       in a flat namespace, not place multiple values within a container. Ideally, a processor would make use
       of<code>rdfs:range</code> declarations at parse time so properly typed literals could be constructed. It also
@@ -324,8 +324,14 @@
     <a href="http://www.w3.org/2011/htmldata/track/issues">Task Force Issue Tracker</a>. These include the
     following:</p>
   <dl>
-    <dt><a href="">ISSUE 1</a></dt><dd>Vocabulary specific parsing for Microdata</dd>
-    <dt><a href="">ISSUE 2</a></dt><dd>Should Microdata-RDF generate XMLLiteral values</dd>
+    <dt><a href="http://www.w3.org/2011/htmldata/track/issues/1">ISSUE 1</a></dt><dd>Vocabulary specific parsing for Microdata</dd>
+    <dt><a href="http://www.w3.org/2011/htmldata/track/issues/2">ISSUE 2</a></dt><dd>
+      Should Microdata-RDF generate XMLLiteral values. This issue has been closed with no change
+      as this would violate microdata's data model.
+    </dd>
+    <dt><a href="http://www.w3.org/2011/htmldata/track/issues/3">ISSUE 3</a></dt><dd>
+      Should the registry allow property datatype specification.
+    </dd>
   </dl>
 </section>
 
@@ -335,7 +341,7 @@
     about the need for a registry and the details of processing. Among the options investigated by
     the Task Force are the following:</p>
   <ul>
-    <li>Property URI generation using the original Microdata specification with a base URI and fragment
+    <li>Property URI generation using the original microdata specification with a base URI and fragment
       made up of the in-scope <aref>itemtype</aref> and <aref>itemprop</aref> elements.</li>
     <li>Vocabulary-based URI generation, where the <tref>vocabulary</tref> is determined from the
       in-scope <aref>itemtype</aref>, either through an algorithmic modification of the type URI or by matching the
@@ -355,7 +361,7 @@
 <section>
   <h1>Attributes and Syntax</h1>
   <p>
-    The Microdata specification [[!MICRODATA]] defines a number of attributes and the way in which those
+    The microdata specification [[!MICRODATA]] defines a number of attributes and the way in which those
     attributes are to be interpreted. This section describes those attributes, with reference to their
     original definition.
   </p>
@@ -433,9 +439,10 @@
 <section>
   <h1>Vocabulary Registry</h1>
   <p>In a perfect world, all processors would be able to generate the same output for a given input
-    without regards to the requirements of a particular <tref>vocabulary</tref>. However, Microdata doesn't
+    without regards to the requirements of a particular <tref>vocabulary</tref>. However, microdata doesn't
     provide sufficient syntactic help in making these decisions. Different vocabularies have different
     needs.</p>
+  <p></p>
   <p>The <tdef>registry</tdef> associates a <tdef>URI prefix</tdef> with one or more key-value pairs denoting
   processor behavior. A hypothetical JSON representation of such a registry might be the following:</p>
 <pre class="example" data-transform="updateExample">
@@ -482,10 +489,16 @@
     <a href="#generate-predicate-URI">Generate Predicate URI</a>.</p>
   <p>Possible values for <tref><code>propertyURI</code></tref> are the following:</p>
   <dl>
+    <dt><code>base</code></dt><dd>
+      <p>The <code>base</code> URI generation scheme uses an <aref>itemtype</aref> URI to create a
+        property URI by using the portion of the itemtype URI up to and including the final '#' or '/'.</p>
+      <p>For example, given a type of <code>http://schema.org/Person</code> and a property name of <code>name</code>,
+        the resulting property URI would be <code>http://schema.org/name</code>.</p>
+    </dd>
     <dt><code>contextual</code></dt><dd>
       The <code>contextual</code> URI generation scheme guarantees that generated property URIs are
       unique based on the value of <tref>current property</tref>. This is
-      required as the Microdata data model requires that property names are associated with specific
+      required as the microdata data model requires that property names are associated with specific
       items and do not have a global scope.
       <div class="note">
         <p>URI creation uses a base URI with query parameters to indicate the in-scope
@@ -542,7 +555,7 @@
   <h2>Value Ordering</h2>
   <p>For items having multiple values for a property,
     the <tdef><code>multipleValues</code></tdef> rule defines the algorithm for serializing these values.
-    This is required as the Microdata data model requires that values be strictly ordered as defined in
+    This is required as the microdata data model requires that values be strictly ordered as defined in
     <cite><a href="http://www.w3.org/TR/2011/WD-microdata-20110525/#microdata-dom-api">Microdata DOM API</a></cite>
     as <code>element.itemValue</code>. However, many RDF vocabularies expect multiple values to be generated
     as triples sharing a common subject and predicate.</p>
@@ -557,6 +570,17 @@
     </dl>
     <p>The default value of <tref><code>multipleValues</code></tref> is <code>list</code>.</p>
 </section>
+
+<section>
+  <h2>Value Typing</h2>
+  <p>One possible use of a registry would allow vocabularies to be marked with datatype information,
+    so that a <code>dc:time</code> value, for example, would be understood to represent a literal with datatype
+    <code>xsd:date</code>. This could be done by adding information for each property in the vocabulary requiring
+    special treatment.</p>
+  <p>Additionally, literal values which should be interpreted as URI references could be given special treatment.</p>
+  <p>These concepts are not explored further at this time, but could be developed further in
+    a future revision of this document.</p>
+</section>
 </section>
 
 <section>
@@ -752,13 +776,13 @@
 
   <section>
     <h3>RDF Conversion Algorithm</h3>
-    <p>A HTML document containing Microdata MAY be converted to any other RDF-compatible document
+    <p>A HTML document containing microdata MAY be converted to any other RDF-compatible document
     format using the algorithm specified in this section.</p>
     <p>
       The algorithm below is designed for DOM-based implementations with CSS selector access to elements.
     </p>
     <p>
-      A conforming Microdata processor implementing RDF conversion MUST implement a
+      A conforming microdata processor implementing RDF conversion MUST implement a
       processing algorithm that results in the equivalent triples that the following
       algorithm generates:
     </p>
@@ -808,7 +832,7 @@
       <tref>Evaluation Context</tref>, it must run the following steps:
     </p>
     <p class="note">
-      This algorithm has undergone substantial change from the original Microdata specification [[!MICRODATA]].
+      This algorithm has undergone substantial change from the original microdata specification [[!MICRODATA]].
     </p>
     <ol class="algorithm">
       <li>
@@ -914,11 +938,14 @@
       </li>
       <li>Otherwise, if <tref>current vocabulary</tref> from <em>context</em> is not null
         and <tref>registry</tref> has an entry for <tref>current vocabulary</tref> having a
-        <tref>propertyURI</tref> entry that is not null, set that as <em>method</em>. Otherwise,
-        set <em>method</em> to <code>contextual</code>.</li>
-      <li>If <em>method</em> is <code>vocabulary</code> return the <tref>URI reference</tref> constructed
+        <tref>propertyURI</tref> entry that is not null, set that as <em>scheme</em>. Otherwise,
+        set <em>scheme</em> to <code>contextual</code>.</li>
+      <li>If <em>scheme</em> is <code>base</code> return the <tref>URI reference</tref> constructed
+        by removing everything following the last SOLIDUS U+002F ("/") or NUMBER SIGN U+0023 ("#")
+        from <tref>current type</tref> and append the fragment-escaped value of <em>name</em>.</li>
+      <li>If <em>scheme</em> is <code>vocabulary</code> return the <tref>URI reference</tref> constructed
         by appending the fragment escaped value of <em>name</em> to <tref>current vocabulary</tref>.</li>
-      <li>If <em>method</em> is <code>type</code>, return the <tref>URI reference</tref> constructed as follows:
+      <li>If <em>scheme</em> is <code>type</code>, return the <tref>URI reference</tref> constructed as follows:
         <ol class="algorithm">
           <li>Let <em>s</em> be <tref>current type</tref> from <em>context</em>.</li>
           <li>If <em>s</em> does not contain a U+0023 NUMBER SIGN character (#),
@@ -932,7 +959,7 @@
           as SOLIDUS (/)).
         </div>
       </li>
-      <li>If <em>method</em> is <code>contextual</code>, return the <tref>URI reference</tref> constructed as follows:
+      <li>If <em>scheme</em> is <code>contextual</code>, return the <tref>URI reference</tref> constructed as follows:
         <ol class="algorithm">
           <li>Let <em>s</em> be <tref>current type</tref> from <em>context</em>.</li>
           <li>If <code>http://www.w3.org/ns/md?type=</code> is a prefix of <em>s</em>,
@@ -1005,7 +1032,7 @@
       <code>rdf:first</code> and <code>rdf:next </code>is required to be able to specify a particular order.
     </p>
     <p>
-      In the Microdata to RDF mapping, <tref>RDF Collection</tref>s are used when an item has more than one value
+      In the microdata to RDF mapping, <tref>RDF Collection</tref>s are used when an item has more than one value
       associated with a given property to ensure that the original document order is maintained. The following
       procedure should be used to generate triples when an <tref>item</tref> property has more than one value
       (contained in <em>list</em>):
@@ -1050,7 +1077,7 @@
 <section class="appendix">
 <h2>Markup Examples</h2>
 
-<p>The Microdata example below expresses book information as an FRBR Work item.</p>
+<p>The microdata example below expresses book information as an FRBR Work item.</p>
 
 <pre class="example" data-transform="updateExample">
 <!--
@@ -1163,7 +1190,7 @@
 <section class="appendix informative">
   <h1>Acknowledgements</h1>
   <p>Thanks to Richard Cyganiak for property URI and vocabulary terminology and the general excellent
-    consideration of practical problems in generating RDF from Microdata.</p>
+    consideration of practical problems in generating RDF from microdata.</p>
 </section>
 
 </body>