[html5] r3103 - [at] (0) Add vCard example; remove CR from vEvent example; mention 'article' inc [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu May 14 17:35:03 PDT 2009


Author: ianh
Date: 2009-05-14 17:35:02 -0700 (Thu, 14 May 2009)
New Revision: 3103

Modified:
   index
   source
Log:
[at] (0) Add vCard example; remove CR from vEvent example; mention 'article' includes blog entries; remove bogus 'conference' entry type in table; add bibtex examples; add support for citation object in JSON output.

Modified: index
===================================================================
--- index	2009-05-14 23:49:30 UTC (rev 3102)
+++ index	2009-05-15 00:35:02 UTC (rev 3103)
@@ -39,7 +39,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 14 May 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 15 May 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -681,11 +681,15 @@
    <li><a href=#microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</a></li>
    <li><a href=#predefined-vocabularies><span class=secno>5.4 </span>Predefined vocabularies</a>
     <ol>
-     <li><a href=#vcard><span class=secno>5.4.1 </span>vCard</a></li>
+     <li><a href=#vcard><span class=secno>5.4.1 </span>vCard</a>
+      <ol>
+       <li><a href=#examples><span class=secno>5.4.1.1 </span>Examples</a></ol></li>
      <li><a href=#vevent><span class=secno>5.4.2 </span>vEvent</a>
       <ol>
-       <li><a href=#examples><span class=secno>5.4.2.1 </span>Examples</a></ol></li>
-     <li><a href=#bibtex><span class=secno>5.4.3 </span>BibTeX</a></li>
+       <li><a href=#examples-0><span class=secno>5.4.2.1 </span>Examples</a></ol></li>
+     <li><a href=#bibtex><span class=secno>5.4.3 </span>BibTeX</a>
+      <ol>
+       <li><a href=#examples-1><span class=secno>5.4.3.1 </span>Examples</a></ol></li>
      <li><a href=#rdf><span class=secno>5.4.4 </span>RDF</a></ol></li>
    <li><a href=#converting-html-to-other-formats><span class=secno>5.5 </span>Converting HTML to other formats</a>
     <ol>
@@ -42460,21 +42464,89 @@
 
    <dd>
 
-  </dl><!--XXX
+  </dl><h5 id=examples><span class=secno>5.4.1.1 </span>Examples</h5>
 
-  <h5>Examples</h5>
+  <div class=example>
 
-<address item=vcard>
- <strong title="fn">Alfred Person</strong> <br>
- <span itemprop="adr" item>
-  <span itemprop="street-address">1600 Amphitheatre Parkway</span> <br>
-  <span itemprop="street-address">Building 43, Second Floor</span> <br>
-  <span itemprop="locality">Mountain View</span>,
-   <span itemprop="region">CA</span> <span itemprop="postal-code">94043</span>
- </span>
-</address>
---><h4 id=vevent><span class=secno>5.4.2 </span>vEvent</h4>
+   <p>Here is a long example <code title=md-vcard><a href=#md-vcard>vcard</a></code> for a
+   fictional character called "Jack Bauer":</p>
 
+   <pre><section id="jack" item="vcard">
+ <h1 itemprop="fn">Jack Bauer</h1>
+ <img itemprop="photo" alt="" src="jack-bauer.jpg">
+ <p itemprop="org" item>
+  <span itemprop="organization-name">Counter-Terrorist Unit</span>
+  (<span itemprop="organization-unit">Los Angeles Division</span>)
+ </p>
+ <p>
+  <span class="adr" item>
+   <span itemprop="street-address">10201 W. Pico Blvd.</span><br>
+   <span itemprop="locality">Los Angeles</span>,
+   <span itemprop="region">CA</span>
+   <span itemprop="postal-code">90064</span><br>
+   <span itemprop="country-name">United States</span><br>
+  </span>
+  <span itemprop="geo">34.052339;-118.410623</span>
+ </p>
+ <h2>Assorted Contact Methods</h2>
+ <ul>
+  <li itemprop="tel" item><span itemprop="value">+1 (310) 597
+  3781</span> <span itemprop="type">work</span></li>
+  <li><a itemprop="url"
+  href="http://en.wikipedia.org/wiki/Jack_Bauer">I'm on
+  Wikipedia</a> so you can leave a message on my user talk
+  page.</li>
+  <li><a itemprop="url"
+  href="http://www.jackbauerfacts.com/">Jack Bauer Facts</a></li>
+  <li itemprop="email"><a
+  href="mailto:j.bauer at la.ctu.gov.invalid">j.bauer at la.ctu.gov.invalid</a></li>
+  <li itemprop="tel" item><span itemprop="value">+1 (310) 555
+  3781</span> <span><meta itemprop="type" content="cell">mobile
+  phone</span>></li>
+ </ul>
+ <p itemprop="note">If I'm out in the field, you may be better
+ off contacting <span itemprop="agent" item="vcard"><a
+ itemprop="email" href="mailto:c.obrian at la.ctu.gov.invalid"><span
+ itemprop="fn">Chloe O'Brian</span></a></span> if it's about
+ work, or ask <span itemprop="agent">Tony Almeida</span> if
+ you're interested in the CTU five-a-side football team we're
+ trying to get going.</p>
+ <ins datetime="2008-07-20T21:00:00+0100">
+  <span itemprop="rev" item>
+   <meta itemprop="type" content="date-time">
+   <meta itemprop="value" content="2008-07-20T21:00:00+0100">
+  </span>
+  <p itemprop="tel" item><strong>Update!</strong>
+  My new <span itemprop="type">home</span> phone number is
+  <span itemprop="value">01632 960 123</span>.
+ </ins>
+</section></pre>
+
+  </div>
+
+  <div class=example>
+
+   <p>This example shows a site's contact details (using the
+   <code><a href=#the-address-element>address</a></code> element) containing an address with two street
+   components:</p>
+
+   <pre>
+<address item=vcard>
+ <strong title="fn">Alfred Person</strong> <br>
+ <span itemprop="adr" item>
+  <span itemprop="street-address">1600 Amphitheatre Parkway</span> <br>
+  <span itemprop="street-address">Building 43, Second Floor</span> <br>
+  <span itemprop="locality">Mountain View</span>,
+   <span itemprop="region">CA</span> <span itemprop="postal-code">94043</span>
+ </span>
+</address></pre>
+
+  </div>
+
+
+
+  <h4 id=vevent><span class=secno>5.4.2 </span>vEvent</h4>
+
   <p>An item with the <a href=#predefined-type>predefined type</a> <dfn id=md-vevent title=md-vevent><code>vevent</code></dfn> represents an event.</p>
 
   <p>The following are the type's <a href=#predefined-property-name title="predefined property
@@ -42995,7 +43067,7 @@
 
     </ul></li>
 
-  </ol><h5 id=examples><span class=secno>5.4.2.1 </span>Examples</h5>
+  </ol><h5 id=examples-0><span class=secno>5.4.2.1 </span>Examples</h5>
 
 <!-- get more from http://www.ietf.org/rfc/rfc2445.txt -->
 
@@ -43049,7 +43121,7 @@
       value = value.replace(/\\/g, '\\n');
       value = value.replace(/;/g, '\\;');
       value = value.replace(/,/g, \\,');
-      value = value.replace(/[\r\n]/g, '\\n');
+      value = value.replace(/\n/g, '\\n');
     }
     for (var nameIndex = 0; nameIndex < prop.itemprop.length; nameIndex += 1) {
       var name = prop.itemprop[nameIndex];
@@ -43100,7 +43172,7 @@
     text with one of the following values:</p>
 
     <dl><dt><dfn id=md-bibtex-entrytype-article title=md-bibtex-entrytype-article><code>article</code></dfn></dt>
-     <dd><p>A journal or magazine article.</dd>
+     <dd><p>A journal, magazine, or Web site article.</dd>
 
      <dt><dfn id=md-bibtex-entrytype-book title=md-bibtex-entrytype-book><code>book</code></dfn></dt>
      <dd><p>A published book or booklet.</dd>
@@ -43342,8 +43414,8 @@
 
    <dd>
 
-    <p>Gives the name of the journal or magazine in which the work
-    cited by the bibliographic entry was published.</p>
+    <p>Gives the name of the journal, magazine, or Web site in which
+    the work cited by the bibliographic entry was published.</p>
 
     <p>The <a href=#concept-property-value title=concept-property-value>value</a> must be
     text.</p>
@@ -43634,6 +43706,7 @@
       <code title=md-bibtex-number><a href=#md-bibtex-number>number</a></code>,
       <code title=md-bibtex-pages><a href=#md-bibtex-pages>pages</a></code>,
       <strong><code title=md-bibtex-title><a href=#md-bibtex-title>title</a></code></strong>*,
+      <code title=md-bibtex-url><a href=#md-bibtex-url>url</a></code>, <!-- this is an "innovation"... -->
       <code title=md-bibtex-volume><a href=#md-bibtex-volume>volume</a></code>,
       <strong><code title=md-bibtex-year><a href=#md-bibtex-year>year</a></code></strong>*
     <tr><td>
@@ -43664,21 +43737,6 @@
       <strong><code title=md-bibtex-title><a href=#md-bibtex-title>title</a></code></strong>*,
       <code title=md-bibtex-year><a href=#md-bibtex-year>year</a></code>
     <tr><td>
-      <code title=md-bibtex-entrytype-conference>conference</code>
-     <td>
-      <code title=md-bibtex-address><a href=#md-bibtex-address>address</a></code>,
-      <strong><code title=md-bibtex-author><a href=#md-bibtex-author>author</a></code></strong>*,
-      <strong><code title=md-bibtex-booktitle><a href=#md-bibtex-booktitle>booktitle</a></code></strong>*,
-      <code title=md-bibtex-editor><a href=#md-bibtex-editor>editor</a></code>,
-      <code title=md-bibtex-key><a href=#md-bibtex-key>key</a></code>,
-      <code title=md-bibtex-month><a href=#md-bibtex-month>month</a></code>,
-      <code title=md-bibtex-note><a href=#md-bibtex-note>note</a></code>,
-      <code title=md-bibtex-organization><a href=#md-bibtex-organization>organization</a></code>,
-      <code title=md-bibtex-pages><a href=#md-bibtex-pages>pages</a></code>,
-      <code title=md-bibtex-publisher><a href=#md-bibtex-publisher>publisher</a></code>,
-      <strong><code title=md-bibtex-title><a href=#md-bibtex-title>title</a></code></strong>*,
-      <strong><code title=md-bibtex-year><a href=#md-bibtex-year>year</a></code></strong>*
-    <tr><td>
       <code title=md-bibtex-entrytype-inbook><a href=#md-bibtex-entrytype-inbook>inbook</a></code>
      <td>
       <code title=md-bibtex-address><a href=#md-bibtex-address>address</a></code>,
@@ -43803,14 +43861,35 @@
       <strong><code title=md-bibtex-note><a href=#md-bibtex-note>note</a></code></strong>*,
       <strong><code title=md-bibtex-title><a href=#md-bibtex-title>title</a></code></strong>*,
       <code title=md-bibtex-year><a href=#md-bibtex-year>year</a></code>
-  </table><!--
+  </table><h5 id=examples-1><span class=secno>5.4.3.1 </span>Examples</h5>
 
-  <h5>Examples</h5>
+  <div class=example>
 
-  <p class="XXX">...</p>
+   <p>This example shows how an article's footer can give the citation
+   information for the article:</p>
 
---><h4 id=rdf><span class=secno>5.4.4 </span>RDF</h4>
+   <pre><article id="friend">
+ <h1>Friend in the kingdom</h1>
+ <p>I got a friend in the kingdom, ain't that good news?</p>
+ <footer>
+  <p item=bibtex>Cite as:
+   <meta itemprop="entrytype" content="article">
+   <span itemprop="author">Nerissa Nields and Katryna Nields</span>
+   <span itemprop="title">Friend in the Kingdom</span>
+   <span itemprop="journal">Ain't That Good News</span>
+   <span itemprop="year">2009</span>
+   <span itemprop="month">April</span>
+   <link itemprop="url" href="#friend"> <!-- relative url to this page -->
+  </p>
+ </footer>
+</article></pre>
 
+  </div>
+
+
+
+  <h4 id=rdf><span class=secno>5.4.4 </span>RDF</h4>
+
   <p>The <dfn id=md-about title=md-about><code>about</code></dfn> property can
   be used to name an <a href=#concept-item title=concept-item>item</a> for the
   purposes of refering to the data defined in that item from RDF.</p>
@@ -43842,6 +43921,23 @@
 
    <li><p>Add an entry to <var title="">result</var> called "<code title="">items</code>" whose value is the array <var title="">items</var>.</li>
 
+   <li><p>Let <var title="">current node</var> be <var title="">node</var>.</p>
+
+   <li><p>Let <var title="">citation</var> be null.</p>
+
+   <li><p><i>Citation search:</i> If <var title="">current node</var>
+   has a descendant element that is a <a href=#top-level-microdata-items title="top-level microdata
+   items">top-level microdata item</a> with the type <code title=md-bibtex><a href=#md-bibtex>bibtex</a></code>, then <a href=#get-the-object>get the object</a>
+   for that element and let <var title="">citation</var> be that
+   object.</li>
+
+   <li><p>If <var title="">citation</var> is null and <var title="">current node</var> has a parent node, let <var title="">current node</var> be its parent node and jump back to the
+   step labeled <i>citation search</i>.</li>
+
+   <li><p>If <var title="">citation</var> is not null, add an entry to
+   <var title="">result</var> called "<code title="">citation</code>"
+   whose value is the <var title="">citation</var> object.</li>
+
    <li><p>Return the result of serializing <var title="">result</var>
    to JSON.</li>
 
@@ -69021,6 +69117,7 @@
   Thomas O'Connor,
   Tim Altman,
   Tim Johansson,
+  Toby Inkster,
   Todd Moody,
   Tom Pike,
   Tommy Thorsen,

Modified: source
===================================================================
--- source	2009-05-14 23:49:30 UTC (rev 3102)
+++ source	2009-05-15 00:35:02 UTC (rev 3103)
@@ -48029,11 +48029,73 @@
   </dl>
 
 
+  <h5>Examples</h5>
 
-<!--XXX
+  <div class="example">
 
-  <h5>Examples</h5>
+   <p>Here is a long example <code title="md-vcard">vcard</code> for a
+   fictional character called "Jack Bauer":</p>
 
+   <pre><section id="jack" item="vcard">
+ <h1 itemprop="fn">Jack Bauer</h1>
+ <img itemprop="photo" alt="" src="jack-bauer.jpg">
+ <p itemprop="org" item>
+  <span itemprop="organization-name">Counter-Terrorist Unit</span>
+  (<span itemprop="organization-unit">Los Angeles Division</span>)
+ </p>
+ <p>
+  <span class="adr" item>
+   <span itemprop="street-address">10201 W. Pico Blvd.</span><br>
+   <span itemprop="locality">Los Angeles</span>,
+   <span itemprop="region">CA</span>
+   <span itemprop="postal-code">90064</span><br>
+   <span itemprop="country-name">United States</span><br>
+  </span>
+  <span itemprop="geo">34.052339;-118.410623</span>
+ </p>
+ <h2>Assorted Contact Methods</h2>
+ <ul>
+  <li itemprop="tel" item><span itemprop="value">+1 (310) 597
+  3781</span> <span itemprop="type">work</span></li>
+  <li><a itemprop="url"
+  href="http://en.wikipedia.org/wiki/Jack_Bauer">I'm on
+  Wikipedia</a> so you can leave a message on my user talk
+  page.</li>
+  <li><a itemprop="url"
+  href="http://www.jackbauerfacts.com/">Jack Bauer Facts</a></li>
+  <li itemprop="email"><a
+  href="mailto:j.bauer at la.ctu.gov.invalid">j.bauer at la.ctu.gov.invalid</a></li>
+  <li itemprop="tel" item><span itemprop="value">+1 (310) 555
+  3781</span> <span><meta itemprop="type" content="cell">mobile
+  phone</span>></li>
+ </ul>
+ <p itemprop="note">If I'm out in the field, you may be better
+ off contacting <span itemprop="agent" item="vcard"><a
+ itemprop="email" href="mailto:c.obrian at la.ctu.gov.invalid"><span
+ itemprop="fn">Chloe O'Brian</span></a></span> if it's about
+ work, or ask <span itemprop="agent">Tony Almeida</span> if
+ you're interested in the CTU five-a-side football team we're
+ trying to get going.</p>
+ <ins datetime="2008-07-20T21:00:00+0100">
+  <span itemprop="rev" item>
+   <meta itemprop="type" content="date-time">
+   <meta itemprop="value" content="2008-07-20T21:00:00+0100">
+  </span>
+  <p itemprop="tel" item><strong>Update!</strong>
+  My new <span itemprop="type">home</span> phone number is
+  <span itemprop="value">01632 960 123</span>.
+ </ins>
+</section></pre>
+
+  </div>
+
+  <div class="example">
+
+   <p>This example shows a site's contact details (using the
+   <code>address</code> element) containing an address with two street
+   components:</p>
+
+   <pre>
 <address item=vcard>
  <strong title="fn">Alfred Person</strong> <br>
  <span itemprop="adr" item>
@@ -48042,10 +48104,12 @@
   <span itemprop="locality">Mountain View</span>,
    <span itemprop="region">CA</span> <span itemprop="postal-code">94043</span>
  </span>
-</address>
--->
+</address></pre>
 
+  </div>
 
+
+
   <h4>vEvent</h4>
 
   <p>An item with the <span>predefined type</span> <dfn
@@ -48719,7 +48783,7 @@
       value = value.replace(/\\/g, '\\n');
       value = value.replace(/;/g, '\\;');
       value = value.replace(/,/g, \\,');
-      value = value.replace(/[\r\n]/g, '\\n');
+      value = value.replace(/\n/g, '\\n');
     }
     for (var nameIndex = 0; nameIndex < prop.itemprop.length; nameIndex += 1) {
       var name = prop.itemprop[nameIndex];
@@ -48776,7 +48840,7 @@
     <dl>
 
      <dt><dfn title="md-bibtex-entrytype-article"><code>article</code></dfn></dt>
-     <dd><p>A journal or magazine article.</p></dd>
+     <dd><p>A journal, magazine, or Web site article.</p></dd>
 
      <dt><dfn title="md-bibtex-entrytype-book"><code>book</code></dfn></dt>
      <dd><p>A published book or booklet.</p></dd>
@@ -49063,8 +49127,8 @@
 
    <dd>
 
-    <p>Gives the name of the journal or magazine in which the work
-    cited by the bibliographic entry was published.</p>
+    <p>Gives the name of the journal, magazine, or Web site in which
+    the work cited by the bibliographic entry was published.</p>
 
     <p>The <span title="concept-property-value">value</span> must be
     text.</p>
@@ -49432,6 +49496,7 @@
       <code title="md-bibtex-number">number</code>,
       <code title="md-bibtex-pages">pages</code>,
       <strong><code title="md-bibtex-title">title</code></strong>*,
+      <code title="md-bibtex-url">url</code>, <!-- this is an "innovation"... -->
       <code title="md-bibtex-volume">volume</code>,
       <strong><code title="md-bibtex-year">year</code></strong>*
     <tr>
@@ -49465,22 +49530,6 @@
       <code title="md-bibtex-year">year</code>
     <tr>
      <td>
-      <code title="md-bibtex-entrytype-conference">conference</code>
-     <td>
-      <code title="md-bibtex-address">address</code>,
-      <strong><code title="md-bibtex-author">author</code></strong>*,
-      <strong><code title="md-bibtex-booktitle">booktitle</code></strong>*,
-      <code title="md-bibtex-editor">editor</code>,
-      <code title="md-bibtex-key">key</code>,
-      <code title="md-bibtex-month">month</code>,
-      <code title="md-bibtex-note">note</code>,
-      <code title="md-bibtex-organization">organization</code>,
-      <code title="md-bibtex-pages">pages</code>,
-      <code title="md-bibtex-publisher">publisher</code>,
-      <strong><code title="md-bibtex-title">title</code></strong>*,
-      <strong><code title="md-bibtex-year">year</code></strong>*
-    <tr>
-     <td>
       <code title="md-bibtex-entrytype-inbook">inbook</code>
      <td>
       <code title="md-bibtex-address">address</code>,
@@ -49617,15 +49666,33 @@
   </table>
 
 
-<!--
-
   <h5>Examples</h5>
 
-  <p class="XXX">...</p>
+  <div class="example">
 
--->
+   <p>This example shows how an article's footer can give the citation
+   information for the article:</p>
 
+   <pre><article id="friend">
+ <h1>Friend in the kingdom</h1>
+ <p>I got a friend in the kingdom, ain't that good news?</p>
+ <footer>
+  <p item=bibtex>Cite as:
+   <meta itemprop="entrytype" content="article">
+   <span itemprop="author">Nerissa Nields and Katryna Nields</span>
+   <span itemprop="title">Friend in the Kingdom</span>
+   <span itemprop="journal">Ain't That Good News</span>
+   <span itemprop="year">2009</span>
+   <span itemprop="month">April</span>
+   <link itemprop="url" href="#friend"> <!-- relative url to this page -->
+  </p>
+ </footer>
+</article></pre>
 
+  </div>
+
+
+
   <h4>RDF</h4>
 
   <p>The <dfn title="md-about"><code>about</code></dfn> property can
@@ -49666,6 +49733,27 @@
    title="">items</code>" whose value is the array <var
    title="">items</var>.</p></li>
 
+   <li><p>Let <var title="">current node</var> be <var
+   title="">node</var>.</p>
+
+   <li><p>Let <var title="">citation</var> be null.</p>
+
+   <li><p><i>Citation search:</i> If <var title="">current node</var>
+   has a descendant element that is a <span title="top-level microdata
+   items">top-level microdata item</span> with the type <code
+   title="md-bibtex">bibtex</code>, then <span>get the object</span>
+   for that element and let <var title="">citation</var> be that
+   object.</p></li>
+
+   <li><p>If <var title="">citation</var> is null and <var
+   title="">current node</var> has a parent node, let <var
+   title="">current node</var> be its parent node and jump back to the
+   step labeled <i>citation search</i>.</p></li>
+
+   <li><p>If <var title="">citation</var> is not null, add an entry to
+   <var title="">result</var> called "<code title="">citation</code>"
+   whose value is the <var title="">citation</var> object.</p></li>
+
    <li><p>Return the result of serializing <var title="">result</var>
    to JSON.</p></li>
 
@@ -81002,6 +81090,7 @@
   Thomas O'Connor,
   Tim Altman,
   Tim Johansson,
+  Toby Inkster,
   Todd Moody,
   Tom Pike,
   Tommy Thorsen,




More information about the Commit-Watchers mailing list