HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
4147Add an example for Microdata based on http://gavin.carothers.name/2009/08/13/trying-to-understand-microdata-rdfa/comment-page-1/#comment-182009-10-16 06:16
@@ -49953,20 +49953,67 @@ document.body.appendChild(outer);</pre>
   title="the properties of an item">properties</span> all to be
   determined.</p>
 
   <p>An <span title="concept-item">item</span> is a <dfn
   title="top-level microdata items">top-level microdata item</dfn> if
   its element does not have an <code
   title="attr-itemprop">itemprop</code> attribute.</p>
 
 
 
+  <h4>Examples</h4>
+
+  <p>Here is an example of some HTML using Microdata to express RDF
+  statements:</p>
+
+  <pre>&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N">
+ &lt;dt>Title&lt;/dt>
+ &lt;dd>&lt;cite itemprop="http://purl.org/dc/terms/title">Just a Geek&lt;/cite>&lt;/dd>
+ &lt;dt>By&lt;/dt>
+ &lt;dd>&lt;span itemprop="http://purl.org/dc/terms/creator">Wil Wheaton&lt;/span>&lt;/dd>
+ &lt;dt>Format&lt;/dt>
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK">
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK">
+  Print
+ &lt;/dd>
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK">
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK">
+  Ebook
+ &lt;/dd>
+&lt;/dl></pre>
+
+  <p>This is equivalent to the following Turtle:</p>
+
+  <pre>@prefix dc: &lt;http://purl.org/dc/terms/> .
+@prefix frbr: &lt;http://purl.org/vocab/frbr/core#> .
+
+&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N> a frbr:Work ;
+     dc:creator "Wil Wheaton"@en ;
+     dc:title "Just a Geek"@en ;
+     frbr:realization &lt;http://purl.oreilly.com/products/9780596007683.BOOK>,
+         &lt;http://purl.oreilly.com/products/9780596802189.EBOOK> . 
+
+&lt;http://purl.oreilly.com/products/9780596007683.BOOK> a frbr:Expression ;
+     dc:type &lt;http://purl.oreilly.com/product-types/BOOK> . 
+
+&lt;http://purl.oreilly.com/products/9780596802189.EBOOK> a frbr:Expression ;
+     dc:type &lt;http://purl.oreilly.com/product-types/EBOOK> .</pre>
+
+
 
   <h3>Microdata DOM API</h3>
 
   <dl class="domintro">
 
    <dt><var title="">document</var> . <code title="dom-getItems()">getItems</code>( [ <var title="">types</var> ] )</dt>
 
    <dd>
 
     <p>Returns a <code>NodeList</code> of the elements in the <code>Document</code> that create <span title="concept-item">items</span>, that are not part of other <span title="concept-item">items</span>, and that are of one of the types given in the argument, if any are listed.</p>

|