W3C home > Mailing lists > Public > public-html-commits@w3.org > January 2010

html5/md Overview.html,1.24,1.25

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 18 Jan 2010 12:55:47 +0000
To: public-html-commits@w3.org
Message-Id: <E1NWr91-0007Xa-OE@lionel-hutz.w3.org>
Update of /sources/public/html5/md
In directory hutz:/tmp/cvs-serv28970

Modified Files:
	Overview.html 
Log Message:
Change how itemref='' is processed to prevent infinite loops in the algorithms that handle microdata. (Mark II) (whatwg r4610)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/md/Overview.html,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Overview.html	18 Jan 2010 11:09:02 -0000	1.24
+++ Overview.html	18 Jan 2010 12:55:45 -0000	1.25
@@ -396,8 +396,7 @@
    <li><a href="#items"><span class="secno">4.2 </span>Items</a></li>
    <li><a href="#names:-the-itemprop-attribute"><span class="secno">4.3 </span>Names: the <code>itemprop</code> attribute</a></li>
    <li><a href="#values"><span class="secno">4.4 </span>Values</a></li>
-   <li><a href="#associating-names-with-items"><span class="secno">4.5 </span>Associating names with items</a></li>
-   <li><a href="#examples"><span class="secno">4.6 </span>Examples</a></ol></li>
+   <li><a href="#associating-names-with-items"><span class="secno">4.5 </span>Associating names with items</a></ol></li>
  <li><a href="#microdata-dom-api"><span class="secno">5 </span>Microdata DOM API</a></li>
  <li><a href="#other-changes-to-html5"><span class="secno">6 </span>Other changes to HTML5</a>
   <ol>
@@ -408,19 +407,21 @@
    <li><a href="#vcard"><span class="secno">7.1 </span>vCard</a>
     <ol>
      <li><a href="#conversion-to-vcard"><span class="secno">7.1.1 </span>Conversion to vCard</a></li>
-     <li><a href="#examples-0"><span class="secno">7.1.2 </span>Examples</a></ol></li>
+     <li><a href="#examples"><span class="secno">7.1.2 </span>Examples</a></ol></li>
    <li><a href="#vevent"><span class="secno">7.2 </span>vEvent</a>
     <ol>
      <li><a href="#conversion-to-icalendar"><span class="secno">7.2.1 </span>Conversion to iCalendar</a></li>
-     <li><a href="#examples-1"><span class="secno">7.2.2 </span>Examples</a></ol></li>
+     <li><a href="#examples-0"><span class="secno">7.2.2 </span>Examples</a></ol></li>
    <li><a href="#licensing-works"><span class="secno">7.3 </span>Licensing works</a>
     <ol>
      <li><a href="#conversion-to-rdf"><span class="secno">7.3.1 </span>Conversion to RDF</a></li>
-     <li><a href="#examples-2"><span class="secno">7.3.2 </span>Examples</a></ol></ol></li>
+     <li><a href="#examples-1"><span class="secno">7.3.2 </span>Examples</a></ol></ol></li>
  <li><a href="#converting-html-to-other-formats"><span class="secno">8 </span>Converting HTML to other formats</a>
   <ol>
    <li><a href="#json"><span class="secno">8.1 </span>JSON</a></li>
-   <li><a href="#rdf"><span class="secno">8.2 </span>RDF</a></ol></li>
+   <li><a href="#rdf"><span class="secno">8.2 </span>RDF</a>
+    <ol>
+     <li><a href="#examples-2"><span class="secno">8.2.1 </span>Examples</a></ol></ol></li>
  <li><a href="#iana"><span class="secno">9 </span>IANA considerations</a>
   <ol>
    <li><a href="#application-microdata-json"><span class="secno">9.1 </span><code>application/microdata+json</code></a></ol></li>
@@ -947,9 +948,8 @@
   to give a list of additional elements to crawl to find the
   name-value pairs of the <a href="#concept-item" title="concept-item">item</a>.<p>The <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute, if
   specified, must have a value that is an <span>unordered set of
-  unique space-separated tokens</span> consisting of <span title="concept-ID">IDs</span> of elements in the same document; for
-  each one, the element's nearest ancestor element with an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified, if any,
-  must not be the element with the referencing <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute specified.<p>The <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute must not
+  unique space-separated tokens</span> consisting of <span title="concept-ID">IDs</span> of elements in the same <span>home
+  subtree</span>.<p>The <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute must not
   be specified on elements that do not have an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified.<h3 id="names:-the-itemprop-attribute"><span class="secno">4.3 </span>Names: the <dfn title="attr-itemprop"><code>itemprop</code></dfn> attribute</h3><p>Every <span title="HTML elements">HTML element</span> may have an
   <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute specified, if
   doing so <a href="#the-properties-of-an-item" title="the properties of an item">adds a
@@ -1097,108 +1097,152 @@
   element</a>.<p>If a property's <a href="#concept-property-value" title="concept-property-value">value</a>
   represents a <span title="concept-date">date</span>, <span title="concept-time">time</span>, or <span title="concept-datetime">global date and time</span>, the property
   must be specified using the <code title="attr-time-datetime">datetime</code> attribute of a
-  <code>time</code> element.<h3 id="associating-names-with-items"><span class="secno">4.5 </span>Associating names with items</h3><p>To find <dfn id="the-properties-of-an-item">the properties of an item</dfn>, the user agent must
-  run the following steps:<ol><li><p>Let <var title="">root</var> be the element with the <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute.</li>
+  <code>time</code> element.<h3 id="associating-names-with-items"><span class="secno">4.5 </span>Associating names with items</h3><p>To find <dfn id="the-properties-of-an-item">the properties of an item</dfn> defined by the
+  element <var title="">root</var>, the user agent must try to
+  <a href="#crawl-the-properties">crawl the properties</a> of the element <var title="">root</var>, with an empty list as the value of <var title="">memory</var>: if this fails, then <a href="#the-properties-of-an-item" title="the
+  properties of an item">the properties of the item</a> defined by
+  the element <var title="">root</var> is an empty list; otherwise, it
+  is the returned list.<p>To <dfn id="crawl-the-properties">crawl the properties</dfn> of an element <var title="">root</var> with a list <var title="">memory</var>, the user
+  agent must run the following steps:<ol><li><p>If <var title="">root</var> is in <var title="">memory</var>, then the algorithm fails; abort these
+   steps.</li>
 
-   <li><p>Let <var title="">pending</var> be a stack of elements
-   initially containing the child elements of <var title="">root</var>, if any. This list will be the one that holds
-   the elements that still need to be crawled.</li>
+   <li><p><a href="#collect-all-the-elements-in-the-item">Collect all the elements in the item</a> <var title="">root</var>, and let <var title="">results</var> be the
+   result.</li>
 
-   <li><p>Let <var title="">properties</var> be an empty list of
-   elements. This list will be the result of the algorithm: a list of
-   elements with properties that apply to <var title="">root</var>.</li>
+   <li><p>If <var title="">root</var> is in <var title="">results</var>, then the algorithm fails; abort these
+   steps.</li>
 
-   <li><p>If <var title="">root</var> has an <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute, <span title="split a
-   string on spaces">split the value of that <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute on spaces</span>. For
-   each resulting token, <var title="">ID</var>, if there is an
-   element in the document with the <span title="concept-ID">ID</span>
-   <var title="">ID</var>, then push the first such element onto <var title="">pending</var>.</li>
+   <li><p>If any elements are listed in <var title="">results</var>
+   more than once, then the algorithm fails; abort these
+   steps.</li>
 
-   <li>
+   <li><p>Remove any elements from <var title="">results</var> that do
+   not have an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute
+   specified.</li>
 
-    <p>For each element <var title="">candidate</var> in <var title="">pending</var>, run the following substeps:</p>
+   <li><p>Let <var title="">new memory</var> be a new list consisting
+   of the old list <var title="">memory</var> with the addition of
+   <var title="">root</var>.</li>
 
-    <ol><li><p>Let <var title="">scope</var> be <var title="">candidate</var>'s nearest ancestor element with an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified, if
-     any, or null otherwise.</li>
+   <li><p>For each element in <var title="">results</var> that has an
+   <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified,
+   <a href="#crawl-the-properties">crawl the properties</a> of the element, with <var title="">new memory</var> as the memory. If this fails, then this
+   instance of the algorithm fails as well; abort these steps. (If it
+   succeeds, the return value is discarded.)</li>
 
-     <li><p>If one of the other elements in <var title="">pending</var>
-     is also <var title="">candidate</var>, then remove <var title="">candidate</var> from <var title="">pending</var>
-     (i.e. remove duplicates).</li>
+   <li><p>Sort <var title="">results</var> in <span>tree
+   order</span>.</li>
 
-     <li><p>Otherwise, if one of the other elements in <var title="">pending</var> is an ancestor element of <var title="">candidate</var>, and that element is <var title="">scope</var>, then remove <var title="">candidate</var>
-     from <var title="">pending</var> (since <var title="">candidate</var> will be reached anyway as part of
-     processing <var title="">scope</var>).</li>
+   <li><p>Return <var title="">results</var>.</li>
 
-     <li><p>Otherwise, if one of the other elements in <var title="">pending</var> is an ancestor element of <var title="">candidate</var>, and either <var title="">scope</var> is
-     null or that element also has <var title="">scope</var> as its
-     nearest ancestor element with an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute specified, then
-     remove <var title="">candidate</var> from <var title="">pending</var> (since <var title="">candidate</var> will
-     be reached anyway as part of processing <var title="">scope</var>).</li>
+  </ol><p>To <dfn id="collect-all-the-elements-in-the-item">collect all the elements in the item</dfn> <var title="">root</var>, the user agent must run these steps:<ol><li><p>Let <var title="">results</var> and <var title="">pending</var> be empty lists of elements.</li>
 
-    </ol></li>
+   <li><p>Add all the children elements of <var title="">root</var> to
+   <var title="">pending</var>.</li>
 
-   <li><p>Sort <var title="">pending</var> in <span>tree
-   order</span>.</li>
+   <li><p>If <var title="">root</var> has an <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute, <span title="split a
+   string on spaces">split the value of that <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute on spaces</span>. For
+   each resulting token <var title="">ID</var>, if there is an element
+   in the <span>home subtree</span> of <var title="">root</var> with
+   the <span title="concept-ID">ID</span> <var title="">ID</var>, then
+   add the first such element to <var title="">pending</var>.</li>
 
-   <li><p><i>Loop</i>: Pop the top element from <var title="">pending</var> and let <var title="">current</var> be that
+   <li><p><i>Loop</i>: Remove an element from <var title="">pending</var> and let <var title="">current</var> be that
    element.</li>
 
-   <li><p>If <var title="">current</var> has an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute, then append <var title="">current</var> to <var title="">properties</var>.</li>
+   <li><p>Add <var title="">current</var> to <var title="">results</var>.</li>
 
-   <li><p>If <var title="">current</var> does not have an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute, and <var title="">current</var> is an element with child elements, then:
-   push all the child elements of <var title="">current</var> onto
-   <var title="">pending</var>, in <span>tree order</span> (so the first
-   child of <var title="">current</var> will be the next element to be
-   popped from <var title="">pending</var>).</li>
+   <li><p>If <var title="">current</var> does not have an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute, then: add all
+   the child elements of <var title="">current</var> to <var title="">pending</var>.</li>
 
    <li><p><i>End of loop</i>: If <var title="">pending</var> is not
    empty, return to the step marked <i>loop</i>.</li>
 
-   <li><p>Return <var title="">properties</var>. That is the list of
-   <a href="#the-properties-of-an-item" title="the properties of an item">properties of the
-   item</a> <var title="">root</var>. By definition, this list is
-   in <span>tree order</span>.</li>
+   <li><p>Return <var title="">results</var>.</li>
 
-  </ol><p>A document must not contain any elements that have an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute that would not be
+  </ol><p>An <a href="#concept-item" title="concept-item">item</a> is a <dfn id="top-level-microdata-items" title="top-level microdata items">top-level microdata item</dfn> if
+  its element does not have an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute.<p>An <a href="#concept-item" title="concept-item">item</a> is a <dfn id="used-microdata-items" title="used
+  microdata items">used microdata item</dfn> if it is a <a href="#top-level-microdata-items" title="top-level microdata items">top-level microdata item</a>,
+  or if it has an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code>
+  attribute and would be <a href="#the-properties-of-an-item" title="the properties of an item">found
+  to be the property</a> of an <a href="#concept-item" title="concept-item">item</a> that is itself a <a href="#used-microdata-items" title="used
+  microdata items">used microdata item</a>.<p>A document must not contain any <a href="#concept-item" title="concept-item">items</a> that are not <a href="#used-microdata-items">used microdata
+  items</a>.<p>A document must not contain any elements that have an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute that would not be
   found to be a property of any of the <a href="#concept-item" title="concept-item">items</a> in that document were their <a href="#the-properties-of-an-item" title="the properties of an item">properties</a> all to be
-  determined.<p>An <a href="#concept-item" title="concept-item">item</a> is a <dfn id="top-level-microdata-items" title="top-level microdata items">top-level microdata item</dfn> if
-  its element does not have an <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute.<h3 id="examples"><span class="secno">4.6 </span>Examples</h3><p>Here is an example of some HTML using Microdata to express RDF
-  statements:<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:<pre>@prefix dc: &lt;http://purl.org/dc/terms/&gt; .
-@prefix frbr: &lt;http://purl.org/vocab/frbr/core#&gt; .
+  determined.<p>A document must not contain any <a href="#concept-item" title="concept-item">items</a> for which <a href="#crawl-the-properties" title="crawl the
+  properties">crawling the properties</a> of the element, with an
+  empty list as the value of <var title="">memory</var>, fails.<p class="note">The algorithms in this section are especially
+  inefficient, in the interests of keeping them easy to
+  understand. Implementors are strongly encouraged to refactor and
+  optimise them in their user agents.<div class="example">
 
-&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; . 
+   <p>In this example, a single license statement is applied to two
+   works, using <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> from the
+   items representing the works:</p>
 
-&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt; a frbr:Expression ;
-     dc:type &lt;http://purl.oreilly.com/product-types/BOOK&gt; . 
+   <pre>&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+ &lt;head&gt;
+  &lt;title&gt;Photo gallery&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;body&gt;
+  &lt;h1&gt;My photos&lt;/h1&gt;
+  &lt;figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses"&gt;
+   &lt;img itemprop="work" src="http://dev.w3.org/html5/spec/images/house.jpeg" alt="A white house, boarded up, sits in a forest."&gt;
+   &lt;figcaption itemprop="title"&gt;The house I found.&lt;/figcaption&gt;
+  &lt;/figure&gt;
+  &lt;figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses"&gt;
+   &lt;img itemprop="work" src="http://dev.w3.org/html5/spec/images/mailbox.jpeg" alt="Outside the house is a mailbox. It has a leaflet inside."&gt;
+   &lt;figcaption itemprop="title"&gt;The mailbox.&lt;/figcaption&gt;
+  &lt;/figure&gt;
+  &lt;footer&gt;
+   &lt;p id="licenses"&gt;All images licensed under the &lt;a itemprop="license"
+   href="http://www.opensource.org/licenses/mit-license.php"&gt;MIT
+   license&lt;/a&gt;.&lt;/p&gt;
+  &lt;/footer&gt;
+ &lt;/body&gt;
+&lt;/html&gt;</pre>
 
-&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt; a frbr:Expression ;
-     dc:type &lt;http://purl.oreilly.com/product-types/EBOOK&gt; .</pre><h2 id="microdata-dom-api"><span class="secno">5 </span>Microdata DOM API</h2><pre class="idl">[Supplemental] interface <span>HTMLDocument</span> { <!--WARNING: ALSO DUPLICATED IN HTMLDocument SECTION-->
+   <p>The above results in two items with the type "<code title="">http://n.whatwg.org/work</code>", one with:</p>
+
+   <dl class="brief"><dt>work
+    <dd><code title="">images/house.jpeg</code>
+    <dt>title
+    <dd>The house I found.
+    <dt>license
+    <dd><code title="">http://www.opensource.org/licenses/mit-license.php</code>
+   </dl><p>...and one with:</p>
+
+   <dl class="brief"><dt>work
+    <dd><code title="">images/mailbox.jpeg</code>
+    <dt>title
+    <dd>The mailbox.
+    <dt>license
+    <dd><code title="">http://www.opensource.org/licenses/mit-license.php</code>
+   </dl></div><div class="example">
+
+   <p>In the following invalid example, the items are all empty,
+   because the <code title="attr-itemref"><a href="#attr-itemref">itemref</a></code> attribute on
+   the inner nested item indirectly references the same element twice
+   in the same item:</p>
+
+   <pre class="bad">&lt;!-- invalid example - do not copy --&gt;
+&lt;div itemscope&gt;
+ &lt;span itemprop="example"&gt;This is &lt;em&gt;not&lt;/em&gt; a property of the
+ &lt;code&gt;div&lt;/code&gt; element.&lt;/span&gt;
+ &lt;p itemprop="demo" itemscope itemref="test thing"&gt; &lt;!-- "thing" is a descendant
+                   of "test", which leads to it being included twice, which is invalid --&gt;
+  &lt;span itemprop="sample"&gt;This isn't part of anything either.&lt;/span&gt;
+ &lt;/p&gt;
+&lt;/div&gt;
+&lt;p id="test"&gt;
+ &lt;span id="thing"&gt;(this element is referenced twice by the
+ &lt;code&gt;p&lt;/code&gt; above, causing all the items that involve that
+ &lt;code&gt;itemref=""&lt;/code&gt; attribute to act as if they had no
+ properties.)&lt;/span&gt;
+&lt;/p&gt;</pre>
+
+  </div><h2 id="microdata-dom-api"><span class="secno">5 </span>Microdata DOM API</h2><pre class="idl">[Supplemental] interface <span>HTMLDocument</span> { <!--WARNING: ALSO DUPLICATED IN HTMLDocument SECTION-->
   NodeList <a href="#dom-document-getitems" title="dom-document-getItems">getItems</a>(in optional DOMString typeNames); // <span>microdata</span>
 };
 
@@ -2989,7 +3033,7 @@
   the input does not conform to the rules described for the <code title="md-vcard"><a href="#md-vcard">http://microformats.org/profile/hcard</a></code>
   <a href="#item-type">item type</a> and <a href="#defined-property-name" title="defined property
   name">defined property names</a>.</p><!-- of course since vcard
-  doesn't define error handling, this is somewhat problematic. --><h4 id="examples-0"><span class="secno">7.1.2 </span>Examples</h4><div class="example">
+  doesn't define error handling, this is somewhat problematic. --><h4 id="examples"><span class="secno">7.1.2 </span>Examples</h4><div class="example">
 
    <p>Here is a long example vCard for a fictional character called
    "Jack Bauer":</p>
@@ -3766,7 +3810,7 @@
   <a href="#item-type">item type</a> and <a href="#defined-property-name" title="defined property
   name">defined property names</a>.</p><!-- of course since
   iCalendar doesn't define error handling, this is somewhat
-  problematic. --><h4 id="examples-1"><span class="secno">7.2.2 </span>Examples</h4><!-- get more from http://www.ietf.org/rfc/rfc2445.txt --><div class="example">
+  problematic. --><h4 id="examples-0"><span class="secno">7.2.2 </span>Examples</h4><!-- get more from http://www.ietf.org/rfc/rfc2445.txt --><div class="example">
 
    <p>Here is an example of a page that uses the vEvent vocabulary to
    mark up an event:</p>
@@ -3925,7 +3969,7 @@
   <p class="note">The predicates mentioned in this section are the
   predicates that result from <a href="#extracting-rdf" title="extracting rdf">converting
   to RDF</a> an HTML page containing microdata with an item whose
-  <a href="#item-type" title="item type">type</a> is "<code title="md-work"><a href="#md-work">http://n.whatwg.org/work</a></code>".<h4 id="examples-2"><span class="secno">7.3.2 </span>Examples</h4><div class="example">
+  <a href="#item-type" title="item type">type</a> is "<code title="md-work"><a href="#md-work">http://n.whatwg.org/work</a></code>".<h4 id="examples-1"><span class="secno">7.3.2 </span>Examples</h4><div class="example">
 
    <p>This example shows an embedded image entitled <cite>My
    Pond</cite>, licensed under the Creative Commons Attribution-Share
@@ -4257,7 +4301,54 @@
 
    <li><p>Return <var title="">subject</var>.</li>
 
-  </ol></div><h2 id="iana"><span class="secno">9 </span>IANA considerations</h2><!-- http://www.w3.org/2002/06/registering-mediatype.html --><h3 id="application-microdata-json"><span class="secno">9.1 </span><dfn><code>application/microdata+json</code></dfn></h3><p>This registration is for community review and will be submitted
+  </ol><h4 id="examples-2"><span class="secno">8.2.1 </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>
+
+
+  </div><h2 id="iana"><span class="secno">9 </span>IANA considerations</h2><!-- http://www.w3.org/2002/06/registering-mediatype.html --><h3 id="application-microdata-json"><span class="secno">9.1 </span><dfn><code>application/microdata+json</code></dfn></h3><p>This registration is for community review and will be submitted
   to the IESG for review, approval, and registration with IANA.</p><!--
    To: ietf-types@iana.org
    Subject: Registration of media type application/microdata+json
Received on Monday, 18 January 2010 12:55:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 18 January 2010 12:55:50 GMT