Browse files

[e] (0) Add an example for Microdata based on http://gavin.carothers.…

  • Loading branch information...
1 parent be8646d commit 737b077c1233296d84a3fad529939878672db753 @Hixie Hixie committed Oct 16, 2009
Showing with 151 additions and 8 deletions.
  1. +55 −7 complete.html
  2. +49 −1 index
  3. +47 −0 source
View
62 complete.html
@@ -640,22 +640,23 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
<li><a href=#items><span class=secno>5.2.2 </span>Items</a></li>
<li><a href=#names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <code>itemprop</code> attribute</a></li>
<li><a href=#values><span class=secno>5.2.4 </span>Values</a></li>
- <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></ol></li>
+ <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></li>
+ <li><a href=#examples-1><span class=secno>5.2.6 </span>Examples</a></ol></li>
<li><a href=#microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</a></li>
<li><a href=#microdata-vocabularies><span class=secno>5.4 </span>Microdata vocabularies</a>
<ol>
<li><a href=#vcard><span class=secno>5.4.1 </span>vCard</a>
<ol>
<li><a href=#conversion-to-vcard><span class=secno>5.4.1.1 </span>Conversion to vCard</a></li>
- <li><a href=#examples-1><span class=secno>5.4.1.2 </span>Examples</a></ol></li>
+ <li><a href=#examples-2><span class=secno>5.4.1.2 </span>Examples</a></ol></li>
<li><a href=#vevent><span class=secno>5.4.2 </span>vEvent</a>
<ol>
<li><a href=#conversion-to-icalendar><span class=secno>5.4.2.1 </span>Conversion to iCalendar</a></li>
- <li><a href=#examples-2><span class=secno>5.4.2.2 </span>Examples</a></ol></li>
+ <li><a href=#examples-3><span class=secno>5.4.2.2 </span>Examples</a></ol></li>
<li><a href=#licensing-works><span class=secno>5.4.3 </span>Licensing works</a>
<ol>
<li><a href=#conversion-to-rdf><span class=secno>5.4.3.1 </span>Conversion to RDF</a></li>
- <li><a href=#examples-3><span class=secno>5.4.3.2 </span>Examples</a></ol></ol></li>
+ <li><a href=#examples-4><span class=secno>5.4.3.2 </span>Examples</a></ol></ol></li>
<li><a href=#converting-html-to-other-formats><span class=secno>5.5 </span>Converting HTML to other formats</a>
<ol>
<li><a href=#json><span class=secno>5.5.1 </span>JSON</a></li>
@@ -44868,6 +44869,53 @@ <h4 id=associating-names-with-items><span class=secno>5.2.5 </span>Associating n
+ <h4 id=examples-1><span class=secno>5.2.6 </span>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"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &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"&gt;
+ &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+ Print
+ &lt;/dd&gt;
+ &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"&gt;
+ &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+ Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+ <p>This is equivalent to the following Turtle:</p>
+
+ <pre>@prefix dc: &lt;http://purl.org/dc/terms/&gt; .
+@prefix frbr: &lt;http://purl.org/vocab/frbr/core#&gt; .
+
+&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt; a frbr:Work ;
+ dc:creator "Wil Wheaton"@en ;
+ dc:title "Just a Geek"@en ;
+ frbr:realization &lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;,
+ &lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt; .
+
+&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt; a frbr:Expression ;
+ dc:type &lt;http://purl.oreilly.com/product-types/BOOK&gt; .
+
+&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt; a frbr:Expression ;
+ dc:type &lt;http://purl.oreilly.com/product-types/EBOOK&gt; .</pre>
+
+
<h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
@@ -46648,7 +46696,7 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>
- <h5 id=examples-1><span class=secno>5.4.1.2 </span>Examples</h5>
+ <h5 id=examples-2><span class=secno>5.4.1.2 </span>Examples</h5>
<div class=example>
@@ -47458,7 +47506,7 @@ <h4 id=vevent><span class=secno>5.4.2 </span>vEvent</h4>
- <h5 id=examples-2><span class=secno>5.4.2.2 </span>Examples</h5>
+ <h5 id=examples-3><span class=secno>5.4.2.2 </span>Examples</h5>
<!-- get more from http://www.ietf.org/rfc/rfc2445.txt -->
@@ -47634,7 +47682,7 @@ <h4 id=licensing-works><span class=secno>5.4.3 </span>Licensing works</h4>
- <h5 id=examples-3><span class=secno>5.4.3.2 </span>Examples</h5>
+ <h5 id=examples-4><span class=secno>5.4.3.2 </span>Examples</h5>
<div class=example>
View
50 index
@@ -630,7 +630,8 @@
<li><a href=#items><span class=secno>5.2.2 </span>Items</a></li>
<li><a href=#names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <code>itemprop</code> attribute</a></li>
<li><a href=#values><span class=secno>5.2.4 </span>Values</a></li>
- <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></ol></li>
+ <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></li>
+ <li><a href=#examples-1><span class=secno>5.2.6 </span>Examples</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-other-formats><span class=secno>5.4 </span>Converting HTML to other formats</a>
<ol>
@@ -44697,6 +44698,53 @@ document.body.appendChild(outer);</pre>
+ <h4 id=examples-1><span class=secno>5.2.6 </span>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"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &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"&gt;
+ &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+ Print
+ &lt;/dd&gt;
+ &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"&gt;
+ &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+ Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+ <p>This is equivalent to the following Turtle:</p>
+
+ <pre>@prefix dc: &lt;http://purl.org/dc/terms/&gt; .
+@prefix frbr: &lt;http://purl.org/vocab/frbr/core#&gt; .
+
+&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt; a frbr:Work ;
+ dc:creator "Wil Wheaton"@en ;
+ dc:title "Just a Geek"@en ;
+ frbr:realization &lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;,
+ &lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt; .
+
+&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt; a frbr:Expression ;
+ dc:type &lt;http://purl.oreilly.com/product-types/BOOK&gt; .
+
+&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt; a frbr:Expression ;
+ dc:type &lt;http://purl.oreilly.com/product-types/EBOOK&gt; .</pre>
+
+
<h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
View
47 source
@@ -49960,6 +49960,53 @@ document.body.appendChild(outer);</pre>
+ <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>

0 comments on commit 737b077

Please sign in to comment.