HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/4147

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
Index: source
===================================================================
--- source	(revision 4146)
+++ source	(revision 4147)
@@ -49960,7 +49960,54 @@
 
 
 
+  <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">

|