[html5] r3075 - [e] (0) Fix some typos and add the first draft of an intro section for microdata.

whatwg at whatwg.org whatwg at whatwg.org
Sun May 10 04:21:06 PDT 2009


Author: ianh
Date: 2009-05-10 04:21:05 -0700 (Sun, 10 May 2009)
New Revision: 3075

Modified:
   index
   source
Log:
[e] (0) Fix some typos and add the first draft of an intro section for microdata.

Modified: index
===================================================================
--- index	2009-05-10 10:32:35 UTC (rev 3074)
+++ index	2009-05-10 11:21:05 UTC (rev 3075)
@@ -665,7 +665,10 @@
    <li><a href=#matching-html-elements-using-selectors><span class=secno>4.13 </span>Matching HTML elements using selectors</a></ol></li>
  <li><a href=#microdata><span class=secno>5 </span>Microdata</a>
   <ol>
-   <li><a href=#introduction-2><span class=secno>5.1 </span>Introduction</a></li>
+   <li><a href=#introduction-2><span class=secno>5.1 </span>Introduction</a>
+    <ol>
+     <li><a href=#the-basic-syntax><span class=secno>5.1.1 </span>The basic syntax</a></li>
+     <li><a href=#defining-vocabularies><span class=secno>5.1.2 </span>Defining vocabularies</a></ol></li>
    <li><a href=#encoding-microdata><span class=secno>5.2 </span>Encoding microdata</a>
     <ol>
      <li><a href=#the-microdata-model><span class=secno>5.2.1 </span>The microdata model</a></li>
@@ -674,7 +677,7 @@
      <li><a href=#names:-the-property-attribute><span class=secno>5.2.4 </span>Names: the <code>property</code> attribute</a></li>
      <li><a href=#values><span class=secno>5.2.5 </span>Values</a></ol></li>
    <li><a href=#microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</a></li>
-   <li><a href=#converting-html-to-oher-formats><span class=secno>5.4 </span>Converting HTML to oher formats</a>
+   <li><a href=#converting-html-to-other-formats><span class=secno>5.4 </span>Converting HTML to other formats</a>
     <ol>
      <li><a href=#json><span class=secno>5.4.1 </span>JSON</a></li>
      <li><a href=#rdf><span class=secno>5.4.2 </span>RDF</a></ol></ol></li>
@@ -40588,9 +40591,134 @@
 
   <h3 id=introduction-2><span class=secno>5.1 </span>Introduction</h3>
 
-  <p class=XXX>...</p>
+  <h4 id=the-basic-syntax><span class=secno>5.1.1 </span>The basic syntax</h4>
 
+  <p><em>This section is non-normative.</em></p>
 
+  <p>Sometimes, it is desireable to annotate content with specific
+  machine-readable labels, e.g. to allow generic scripts to provide
+  services that are customised to the page, or to enable content from
+  a variety of cooperating authors to be processed by a single script
+  in a consistent manner.</p>
+
+  <p>For this purpose, authors can use the microdata features
+  described in this section.</p>
+
+  <p>At a high level, microdata consists of a group of name-value
+  pairs. The groups are called <a href=#concept-item title=concept-item>items</a>, and each name-value pair is a
+  property. Items and properties are represented by regular
+  elements.</p>
+
+  <div class=example>
+
+   <p>Here there are two items, each of which have the property "name":</p>
+
+   <pre><div item>
+ <p>My name is <span property="name">Elizabeth</span>.</p>
+</div>
+
+<div item>
+ <p>My name is <span property="name">Daniel</span>.</p>
+</div></pre>
+
+  </div>
+
+  <p>Properties generally have values that are strings.</p>
+
+  <div class=example>
+
+   <p>Here the item has three properties:</p>
+
+   <pre><div item>
+ <p>My name is <span property="name">Neil</span>.</p>
+ <p>My band is called <span property="band">Four Parts Water</span>.</p>
+ <p>I am <span property="nationality">British</span>.</p>
+</div></pre>
+
+  </div>
+
+  <p>Properties can also have values that are URLs. This is achieved
+  using the <code title="">a</code> element and its <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute.</p>
+
+  <div class=example>
+
+   <p>In this example, the item has one property, "image", whose value is a URL:</p>
+
+   <pre><div item>
+ <img property="image" src="google-logo.png" alt="Google">
+</div></pre>
+
+  </div>
+
+  <p>Properties can also have values that are dates, times, or dates
+  and times. This is achieved using the <code title="">time</code>
+  element and its <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code>
+  attribute.</p>
+
+  <div class=example>
+
+   <p>In this example, the item has one property, "birthday", whose
+   value is a date:</p>
+
+   <pre><div item>
+ I was born on <time property="birthday" datetime="2009-05-10">May 10th 2009</time>.
+</div></pre>
+
+  </div>
+
+  <p>Properties can also themselves be groups of name-value pairs, by
+  putting the <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute on the
+  element that declares the property.</p>
+
+  <div class=example>
+
+   <p>In this example, the outer item represents a person, and the
+   inner one represents a band:</p>
+
+   <pre><div item>
+ <p>Name: <span property="name">Amanda</span></p>
+ <p>Band: <span property="band" item> <span property="name">Jazz Band</span> (<span property="size">12</span> players)</span></span></p>
+</div></pre>
+
+   <p>In this example, the outer item has two properties, "name" and
+   "band". The "name" is "Amanda",and the "band" is an item in its own
+   right, with two properties, "name" and "size". The "name" of the
+   band is "Jazz Band", and the "size" is "12".</p>
+
+  </div>
+
+
+  <h4 id=defining-vocabularies><span class=secno>5.1.2 </span>Defining vocabularies</h4>
+
+  <p><em>This section is non-normative.</em></p>
+
+  <p>Using microdata means using a vocabulary. For some purposes, an
+  ad-hoc vocabulary is adequate. For others, a vocabulary will need to
+  be designed. Where possible, authors are encouraged to re-use
+  existing vocabularies, as this makes content re-use easier.</p>
+
+  <p>When designing new vocabularies, identifiers can be created
+  either using <a href=#url title=URL>URLs</a> or <a href=#valid-reversed-dns-identifier title="valid
+  reversed DNS identifier">reversed DNS labels</a>. For URLs
+  conflicts with other vocabularies can be avoided by only using
+  identifiers that correspond to pages that the author has control
+  over. Similarly, for reversed DNS labels conflicts can be avoided by
+  using a domain name that the author has control over, or by using
+  suffixes that correspond to the path components of pages that the
+  author has control over.</p>
+
+  <div class=example>
+
+   <p>For instance, if Jon and Adam both write content at <code title="">example.com</code>, at <code title="">http://example.com/jon/...</code> and <code title="">http://example.com/adam/...</code> respectively, then they
+   could select identifiers of the form "com.example.jon.name" and
+   "com.example.adam.name" respectively.</p>
+
+  </div>
+
+
+
+
+
   <h3 id=encoding-microdata><span class=secno>5.2 </span>Encoding microdata</h3>
 
   <h4 id=the-microdata-model><span class=secno>5.2.1 </span>The microdata model</h4>
@@ -40701,8 +40829,8 @@
 
    <li>If its <a href=#concept-item-corresponding title=concept-item-corresponding>corresponding
    item</a>'s <code title=attr-item><a href=#items:-the-item-attribute>item</a></code> attribute has no
-   tokens: a string containing neither a U+003A COLON character (:), a
-   U+002E FULL STOP character (.), nor a U+0020 SPACE character, or</li>
+   tokens: a string containing neither a U+003A COLON character (:)
+   nor a U+002E FULL STOP character (.), or</li>
 <!--
    <li>If its <span title="concept-item-corresponding">corresponding
    item</span>'s <code title="attr-item">item</code> attribute
@@ -40873,7 +41001,7 @@
 
 
 
-  <h3 id=converting-html-to-oher-formats><span class=secno>5.4 </span>Converting HTML to oher formats</h3>
+  <h3 id=converting-html-to-other-formats><span class=secno>5.4 </span>Converting HTML to other formats</h3>
 
 
   <h4 id=json><span class=secno>5.4.1 </span>JSON</h4>
@@ -40953,7 +41081,7 @@
     <p>If <a href=#the-title-element-0>the <code>title</code> element</a> is not null,
     then generate the following triple:</p>
 
-    <dl><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
+    <dl class=triple><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
      <dt>predicate <dd> <code title="">http://purl.org/dc/terms/title</code>
      <dt>object    <dd> the <code><a href=#textcontent>textContent</a></code> of <a href=#the-title-element-0>the <code>title</code> element</a>
     </dl></li>
@@ -40995,7 +41123,7 @@
       COLON character (:) nor a U+002E FULL STOP character (.),
       generate the following triple:</p>
 
-      <dl><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
+      <dl class=triple><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
        <dt>predicate <dd> the concatenation of the string "<code title="">http://www.w3.org/1999/xhtml/vocab#</code>" and <var title="">token</var>
        <dt>object    <dd> the <a href=#absolute-url>absolute URL</a> that results from <a href=#resolve-a-url title="resolve a URL">resolving</a> the value of the element's <code title="">href</code> attribute relative to the element
       </dl></li>
@@ -41011,7 +41139,7 @@
     contains neither a U+003A COLON character (:) nor a U+002E FULL
     STOP character (.), generate the following triple:</p>
 
-    <dl><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
+    <dl class=triple><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
      <dt>predicate <dd> the concatenation of the string "<code title="">http://www.w3.org/1999/xhtml/vocab#</code>" and value of the element's <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute, <a href=#converted-to-lowercase>converted to lowercase</a>
      <dt>object    <dd> the value of the element's <code title=attr-meta-content><a href=#attr-meta-content>content</a></code> attribute
     </dl></li>
@@ -41025,7 +41153,7 @@
     successfully relative to the element, generate the following
     triple:</p>
 
-    <dl><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
+    <dl class=triple><dt>subject   <dd> <a href="#the-document's-current-address">the document's current address</a>
      <dt>predicate <dd> <code title="">http://purl.org/dc/terms/source</code>
      <dt>object    <dd> the <a href=#absolute-url>absolute URL</a> that results from <a href=#resolve-a-url title="resolve a URL">resolving</a> the value of the element's <code title="">cite</code> attribute relative to the element
     </dl></li>
@@ -41063,7 +41191,7 @@
 
       <p>Generate the following triple:</p>
 
-      <dl><dt>subject   <dd> <var title="">subject</var>
+      <dl class=triple><dt>subject   <dd> <var title="">subject</var>
        <dt>predicate <dd> <code title="">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>
        <dt>object    <dd> <var title="">type</var>
       </dl></li>
@@ -41096,7 +41224,7 @@
 
         <p>Generate the following triple:</p>
 
-        <dl><dt>subject   <dd> <var title="">subject</var>
+        <dl class=triple><dt>subject   <dd> <var title="">subject</var>
          <dt>predicate <dd> <var title="">name</var>
          <dt>object    <dd> <var title="">value</var>
         </dl></li>

Modified: source
===================================================================
--- source	2009-05-10 10:32:35 UTC (rev 3074)
+++ source	2009-05-10 11:21:05 UTC (rev 3075)
@@ -45806,9 +45806,139 @@
 
   <h3>Introduction</h3>
 
-  <p class="XXX">...</p>
+  <h4>The basic syntax</h4>
 
+  <p><em>This section is non-normative.</em></p>
 
+  <p>Sometimes, it is desireable to annotate content with specific
+  machine-readable labels, e.g. to allow generic scripts to provide
+  services that are customised to the page, or to enable content from
+  a variety of cooperating authors to be processed by a single script
+  in a consistent manner.</p>
+
+  <p>For this purpose, authors can use the microdata features
+  described in this section.</p>
+
+  <p>At a high level, microdata consists of a group of name-value
+  pairs. The groups are called <span
+  title="concept-item">items</span>, and each name-value pair is a
+  property. Items and properties are represented by regular
+  elements.</p>
+
+  <div class="example">
+
+   <p>Here there are two items, each of which have the property "name":</p>
+
+   <pre><div item>
+ <p>My name is <span property="name">Elizabeth</span>.</p>
+</div>
+
+<div item>
+ <p>My name is <span property="name">Daniel</span>.</p>
+</div></pre>
+
+  </div>
+
+  <p>Properties generally have values that are strings.</p>
+
+  <div class="example">
+
+   <p>Here the item has three properties:</p>
+
+   <pre><div item>
+ <p>My name is <span property="name">Neil</span>.</p>
+ <p>My band is called <span property="band">Four Parts Water</span>.</p>
+ <p>I am <span property="nationality">British</span>.</p>
+</div></pre>
+
+  </div>
+
+  <p>Properties can also have values that are URLs. This is achieved
+  using the <code title="">a</code> element and its <code
+  title="attr-hyperlink-href">href</code> attribute.</p>
+
+  <div class="example">
+
+   <p>In this example, the item has one property, "image", whose value is a URL:</p>
+
+   <pre><div item>
+ <img property="image" src="google-logo.png" alt="Google">
+</div></pre>
+
+  </div>
+
+  <p>Properties can also have values that are dates, times, or dates
+  and times. This is achieved using the <code title="">time</code>
+  element and its <code title="attr-time-datetime">datetime</code>
+  attribute.</p>
+
+  <div class="example">
+
+   <p>In this example, the item has one property, "birthday", whose
+   value is a date:</p>
+
+   <pre><div item>
+ I was born on <time property="birthday" datetime="2009-05-10">May 10th 2009</time>.
+</div></pre>
+
+  </div>
+
+  <p>Properties can also themselves be groups of name-value pairs, by
+  putting the <code title="attr-item">item</code> attribute on the
+  element that declares the property.</p>
+
+  <div class="example">
+
+   <p>In this example, the outer item represents a person, and the
+   inner one represents a band:</p>
+
+   <pre><div item>
+ <p>Name: <span property="name">Amanda</span></p>
+ <p>Band: <span property="band" item> <span property="name">Jazz Band</span> (<span property="size">12</span> players)</span></span></p>
+</div></pre>
+
+   <p>In this example, the outer item has two properties, "name" and
+   "band". The "name" is "Amanda",and the "band" is an item in its own
+   right, with two properties, "name" and "size". The "name" of the
+   band is "Jazz Band", and the "size" is "12".</p>
+
+  </div>
+
+
+  <h4>Defining vocabularies</h4>
+
+  <p><em>This section is non-normative.</em></p>
+
+  <p>Using microdata means using a vocabulary. For some purposes, an
+  ad-hoc vocabulary is adequate. For others, a vocabulary will need to
+  be designed. Where possible, authors are encouraged to re-use
+  existing vocabularies, as this makes content re-use easier.</p>
+
+  <p>When designing new vocabularies, identifiers can be created
+  either using <span title="URL">URLs</span> or <span title="valid
+  reversed DNS identifier">reversed DNS labels</span>. For URLs
+  conflicts with other vocabularies can be avoided by only using
+  identifiers that correspond to pages that the author has control
+  over. Similarly, for reversed DNS labels conflicts can be avoided by
+  using a domain name that the author has control over, or by using
+  suffixes that correspond to the path components of pages that the
+  author has control over.</p>
+
+  <div class="example">
+
+   <p>For instance, if Jon and Adam both write content at <code
+   title="">example.com</code>, at <code
+   title="">http://example.com/jon/...</code> and <code
+   title="">http://example.com/adam/...</code> respectively, then they
+   could select identifiers of the form "com.example.jon.name" and
+   "com.example.adam.name" respectively.</p>
+
+  </div>
+
+
+
+
+
   <h3>Encoding microdata</h3>
 
   <h4>The microdata model</h4>
@@ -45945,8 +46075,8 @@
 
    <li>If its <span title="concept-item-corresponding">corresponding
    item</span>'s <code title="attr-item">item</code> attribute has no
-   tokens: a string containing neither a U+003A COLON character (:), a
-   U+002E FULL STOP character (.), nor a U+0020 SPACE character, or</li>
+   tokens: a string containing neither a U+003A COLON character (:)
+   nor a U+002E FULL STOP character (.), or</li>
 <!--
    <li>If its <span title="concept-item-corresponding">corresponding
    item</span>'s <code title="attr-item">item</code> attribute
@@ -46155,7 +46285,7 @@
 
 
 
-  <h3>Converting HTML to oher formats</h3>
+  <h3>Converting HTML to other formats</h3>
 
 
   <h4>JSON</h4>
@@ -46268,7 +46398,7 @@
     <p>If <span>the <code>title</code> element</span> is not null,
     then generate the following triple:</p>
 
-    <dl>
+    <dl class="triple">
      <dt>subject   <dd> <span>the document's current address</span>
      <dt>predicate <dd> <code title="">http://purl.org/dc/terms/title</code>
      <dt>object    <dd> the <code>textContent</code> of <span>the <code>title</code> element</span>
@@ -46318,7 +46448,7 @@
       COLON character (:) nor a U+002E FULL STOP character (.),
       generate the following triple:</p>
 
-      <dl>
+      <dl class="triple">
        <dt>subject   <dd> <span>the document's current address</span>
        <dt>predicate <dd> the concatenation of the string "<code title="">http://www.w3.org/1999/xhtml/vocab#</code>" and <var title="">token</var>
        <dt>object    <dd> the <span>absolute URL</span> that results from <span title="resolve a URL">resolving</span> the value of the element's <code title="">href</code> attribute relative to the element
@@ -46339,7 +46469,7 @@
     contains neither a U+003A COLON character (:) nor a U+002E FULL
     STOP character (.), generate the following triple:</p>
 
-    <dl>
+    <dl class="triple">
      <dt>subject   <dd> <span>the document's current address</span>
      <dt>predicate <dd> the concatenation of the string "<code title="">http://www.w3.org/1999/xhtml/vocab#</code>" and value of the element's <code title="attr-meta-name">name</code> attribute, <span>converted to lowercase</span>
      <dt>object    <dd> the value of the element's <code title="attr-meta-content">content</code> attribute
@@ -46356,7 +46486,7 @@
     successfully relative to the element, generate the following
     triple:</p>
 
-    <dl>
+    <dl class="triple">
      <dt>subject   <dd> <span>the document's current address</span>
      <dt>predicate <dd> <code title="">http://purl.org/dc/terms/source</code>
      <dt>object    <dd> the <span>absolute URL</span> that results from <span title="resolve a URL">resolving</span> the value of the element's <code title="">cite</code> attribute relative to the element
@@ -46409,7 +46539,7 @@
 
       <p>Generate the following triple:</p>
 
-      <dl>
+      <dl class="triple">
        <dt>subject   <dd> <var title="">subject</var>
        <dt>predicate <dd> <code title="">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>
        <dt>object    <dd> <var title="">type</var>
@@ -46458,7 +46588,7 @@
 
         <p>Generate the following triple:</p>
 
-        <dl>
+        <dl class="triple">
          <dt>subject   <dd> <var title="">subject</var>
          <dt>predicate <dd> <var title="">name</var>
          <dt>object    <dd> <var title="">value</var>




More information about the Commit-Watchers mailing list