[html5] r6686 - [e] (0) Microdata: add an example of multiple types.

whatwg at whatwg.org whatwg at whatwg.org
Fri Oct 14 15:19:17 PDT 2011


Author: ianh
Date: 2011-10-14 15:19:15 -0700 (Fri, 14 Oct 2011)
New Revision: 6686

Modified:
   complete.html
   index
   source
Log:
[e] (0) Microdata: add an example of multiple types.

Modified: complete.html
===================================================================
--- complete.html	2011-10-14 21:35:06 UTC (rev 6685)
+++ complete.html	2011-10-14 22:19:15 UTC (rev 6686)
@@ -57977,7 +57977,87 @@
   so that each column defines a separate <a href=#concept-item title=concept-item>item</a>, while keeping the properties in
   the cells.</p>
 
+  <div class=example>
 
+   <p>This example shows a simple vocabulary used to describe the
+   products of a model railway manufacturer. The vocabulary has just
+   five property names:</p>
+
+   <dl><dt>product-code</dt>
+    <dd>An integer that names the product in the manufacturer's catalog.</dd>
+    <dt>name</dt>
+    <dd>A brief description of the product.</dd>
+    <dt>scale</dt>
+    <dd>One of "HO", "1", or "Z" (potentially with leading or trailing
+    whitespace), indicating the scale of the product.</dd>
+    <dt>digital</dt>
+    <dd>If present, one of "Digital", "Delta", or "Systems"
+    (potentially with leading or trailing whitespace) indicating that
+    the product has a digital decoder of the given type.</dd>
+    <dt>track-type</dt>
+    <dd>For track-specific products, one of "K", "M", "C" (potentially
+    with leading or trailing whitespace) indicating the type of track
+    for which the product is intended.</dd>
+   </dl><p>This vocabulary has four defined <a href=#item-types>item types</a>:</p>
+
+   <dl><dt>http://md.example.com/loco</dt>
+    <dd>Rolling stock with an engine</dd>
+    <dt>http://md.example.com/passengers</dt>
+    <dd>Passenger rolling stock</dd>
+    <dt>http://md.example.com/track</dt>
+    <dd>Track pieces</dd>
+    <dt>http://md.example.com/lighting</dt>
+    <dd>Equipment with lighting</dd>
+   </dl><p>Each <a href=#concept-item title=concept-item>item</a> that uses this
+   vocabulary can be given one or more of these types, depending on
+   what the product is.</p>
+
+   <p>Thus, a locomotive might be marked up as:</p>
+
+<pre><dl itemscope itemtype="http://md.example.com/loco 
+                        http://md.example.com/lighting">
+ <dt>Name:
+ <dd itemprop="name">Tank Locomotive (DB 80)
+ <dt>Product code:
+ <dd itemprop="product-code">33041
+ <dt>Scale:
+ <dd itemprop="scale">HO
+ <dt>Digital:
+ <dd itemprop="digital">Delta
+</dl></pre>
+
+   <p>A turnout lantern retrofit kit might be marked up as:</p>
+
+   <pre><dl itemscope itemtype="http://md.example.com/track
+                       http://md.example.com/lighting">    
+ <dt>Name:
+ <dd itemprop="name">Turnout Lantern Kit
+ <dt>Product code:
+ <dd itemprop="product-code">74470
+ <dt>Purpose:
+ <dd>For retrofitting 2 <span itemprop="track-type">C</span> Track 
+ turnouts. <meta itemprop="scale" content="HO">
+</dl></pre>
+
+   <p>A passenger car with no lighting might be marked up as:</p>
+
+   <pre><dl itemscope itemtype="http://md.example.com/passengers">
+ <dt>Name:
+ <dd itemprop="name">Express Train Passenger Car (DB Am 203)
+ <dt>Product code:
+ <dd itemprop="product-code">8710
+ <dt>Scale:
+ <dd itemprop="scale">Z
+</dl></pre>
+
+   <p>Great care is necessary when creating new vocabularies. Often, a
+   hierarchical approach to types can be taken that results in a
+   vocabulary where each item only ever has a single type, which is
+   generally much simpler to manage.</p>
+
+  </div>
+
+
   <h4 id=names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <dfn title=attr-itemprop><code>itemprop</code></dfn> attribute</h4>
 
   <p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have an

Modified: index
===================================================================
--- index	2011-10-14 21:35:06 UTC (rev 6685)
+++ index	2011-10-14 22:19:15 UTC (rev 6686)
@@ -57977,7 +57977,87 @@
   so that each column defines a separate <a href=#concept-item title=concept-item>item</a>, while keeping the properties in
   the cells.</p>
 
+  <div class=example>
 
+   <p>This example shows a simple vocabulary used to describe the
+   products of a model railway manufacturer. The vocabulary has just
+   five property names:</p>
+
+   <dl><dt>product-code</dt>
+    <dd>An integer that names the product in the manufacturer's catalog.</dd>
+    <dt>name</dt>
+    <dd>A brief description of the product.</dd>
+    <dt>scale</dt>
+    <dd>One of "HO", "1", or "Z" (potentially with leading or trailing
+    whitespace), indicating the scale of the product.</dd>
+    <dt>digital</dt>
+    <dd>If present, one of "Digital", "Delta", or "Systems"
+    (potentially with leading or trailing whitespace) indicating that
+    the product has a digital decoder of the given type.</dd>
+    <dt>track-type</dt>
+    <dd>For track-specific products, one of "K", "M", "C" (potentially
+    with leading or trailing whitespace) indicating the type of track
+    for which the product is intended.</dd>
+   </dl><p>This vocabulary has four defined <a href=#item-types>item types</a>:</p>
+
+   <dl><dt>http://md.example.com/loco</dt>
+    <dd>Rolling stock with an engine</dd>
+    <dt>http://md.example.com/passengers</dt>
+    <dd>Passenger rolling stock</dd>
+    <dt>http://md.example.com/track</dt>
+    <dd>Track pieces</dd>
+    <dt>http://md.example.com/lighting</dt>
+    <dd>Equipment with lighting</dd>
+   </dl><p>Each <a href=#concept-item title=concept-item>item</a> that uses this
+   vocabulary can be given one or more of these types, depending on
+   what the product is.</p>
+
+   <p>Thus, a locomotive might be marked up as:</p>
+
+<pre><dl itemscope itemtype="http://md.example.com/loco 
+                        http://md.example.com/lighting">
+ <dt>Name:
+ <dd itemprop="name">Tank Locomotive (DB 80)
+ <dt>Product code:
+ <dd itemprop="product-code">33041
+ <dt>Scale:
+ <dd itemprop="scale">HO
+ <dt>Digital:
+ <dd itemprop="digital">Delta
+</dl></pre>
+
+   <p>A turnout lantern retrofit kit might be marked up as:</p>
+
+   <pre><dl itemscope itemtype="http://md.example.com/track
+                       http://md.example.com/lighting">    
+ <dt>Name:
+ <dd itemprop="name">Turnout Lantern Kit
+ <dt>Product code:
+ <dd itemprop="product-code">74470
+ <dt>Purpose:
+ <dd>For retrofitting 2 <span itemprop="track-type">C</span> Track 
+ turnouts. <meta itemprop="scale" content="HO">
+</dl></pre>
+
+   <p>A passenger car with no lighting might be marked up as:</p>
+
+   <pre><dl itemscope itemtype="http://md.example.com/passengers">
+ <dt>Name:
+ <dd itemprop="name">Express Train Passenger Car (DB Am 203)
+ <dt>Product code:
+ <dd itemprop="product-code">8710
+ <dt>Scale:
+ <dd itemprop="scale">Z
+</dl></pre>
+
+   <p>Great care is necessary when creating new vocabularies. Often, a
+   hierarchical approach to types can be taken that results in a
+   vocabulary where each item only ever has a single type, which is
+   generally much simpler to manage.</p>
+
+  </div>
+
+
   <h4 id=names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <dfn title=attr-itemprop><code>itemprop</code></dfn> attribute</h4>
 
   <p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have an

Modified: source
===================================================================
--- source	2011-10-14 21:35:06 UTC (rev 6685)
+++ source	2011-10-14 22:19:15 UTC (rev 6686)
@@ -65393,7 +65393,93 @@
   title="concept-item">item</span>, while keeping the properties in
   the cells.</p>
 
+  <div class="example">
 
+   <p>This example shows a simple vocabulary used to describe the
+   products of a model railway manufacturer. The vocabulary has just
+   five property names:</p>
+
+   <dl>
+    <dt>product-code</dt>
+    <dd>An integer that names the product in the manufacturer's catalog.</dd>
+    <dt>name</dt>
+    <dd>A brief description of the product.</dd>
+    <dt>scale</dt>
+    <dd>One of "HO", "1", or "Z" (potentially with leading or trailing
+    whitespace), indicating the scale of the product.</dd>
+    <dt>digital</dt>
+    <dd>If present, one of "Digital", "Delta", or "Systems"
+    (potentially with leading or trailing whitespace) indicating that
+    the product has a digital decoder of the given type.</dd>
+    <dt>track-type</dt>
+    <dd>For track-specific products, one of "K", "M", "C" (potentially
+    with leading or trailing whitespace) indicating the type of track
+    for which the product is intended.</dd>
+   </dl>
+
+   <p>This vocabulary has four defined <span>item types</span>:</p>
+
+   <dl>
+    <dt>http://md.example.com/loco</dt>
+    <dd>Rolling stock with an engine</dd>
+    <dt>http://md.example.com/passengers</dt>
+    <dd>Passenger rolling stock</dd>
+    <dt>http://md.example.com/track</dt>
+    <dd>Track pieces</dd>
+    <dt>http://md.example.com/lighting</dt>
+    <dd>Equipment with lighting</dd>
+   </dl>
+
+   <p>Each <span title="concept-item">item</span> that uses this
+   vocabulary can be given one or more of these types, depending on
+   what the product is.</p>
+
+   <p>Thus, a locomotive might be marked up as:</p>
+
+<pre><dl itemscope itemtype="http://md.example.com/loco 
+                        http://md.example.com/lighting">
+ <dt>Name:
+ <dd itemprop="name">Tank Locomotive (DB 80)
+ <dt>Product code:
+ <dd itemprop="product-code">33041
+ <dt>Scale:
+ <dd itemprop="scale">HO
+ <dt>Digital:
+ <dd itemprop="digital">Delta
+</dl></pre>
+
+   <p>A turnout lantern retrofit kit might be marked up as:</p>
+
+   <pre><dl itemscope itemtype="http://md.example.com/track
+                       http://md.example.com/lighting">    
+ <dt>Name:
+ <dd itemprop="name">Turnout Lantern Kit
+ <dt>Product code:
+ <dd itemprop="product-code">74470
+ <dt>Purpose:
+ <dd>For retrofitting 2 <span itemprop="track-type">C</span> Track 
+ turnouts. <meta itemprop="scale" content="HO">
+</dl></pre>
+
+   <p>A passenger car with no lighting might be marked up as:</p>
+
+   <pre><dl itemscope itemtype="http://md.example.com/passengers">
+ <dt>Name:
+ <dd itemprop="name">Express Train Passenger Car (DB Am 203)
+ <dt>Product code:
+ <dd itemprop="product-code">8710
+ <dt>Scale:
+ <dd itemprop="scale">Z
+</dl></pre>
+
+   <p>Great care is necessary when creating new vocabularies. Often, a
+   hierarchical approach to types can be taken that results in a
+   vocabulary where each item only ever has a single type, which is
+   generally much simpler to manage.</p>
+
+  </div>
+
+
   <h4>Names: the <dfn title="attr-itemprop"><code>itemprop</code></dfn> attribute</h4>
 
   <p>Every <span title="HTML elements">HTML element</span> may have an




More information about the Commit-Watchers mailing list