NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 567 - 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.
Add vCard example; remove CR from vEvent example; mention 'article' includes ...
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-27 14:35 CEST by Henri Sivonen
Modified: 2009-05-27 14:52 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2009-05-27 14:35:39 CEST
Index: source
===================================================================
--- source	(revision 3102)
+++ source	(revision 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>&lt;section id="jack" item="vcard">
+ &lt;h1 itemprop="fn">Jack Bauer&lt;/h1>
+ &lt;img itemprop="photo" alt="" src="jack-bauer.jpg">
+ &lt;p itemprop="org" item>
+  &lt;span itemprop="organization-name">Counter-Terrorist Unit&lt;/span>
+  (&lt;span itemprop="organization-unit">Los Angeles Division&lt;/span>)
+ &lt;/p>
+ &lt;p>
+  &lt;span class="adr" item>
+   &lt;span itemprop="street-address">10201 W. Pico Blvd.&lt;/span>&lt;br>
+   &lt;span itemprop="locality">Los Angeles&lt;/span>,
+   &lt;span itemprop="region">CA&lt;/span>
+   &lt;span itemprop="postal-code">90064&lt;/span>&lt;br>
+   &lt;span itemprop="country-name">United States&lt;/span>&lt;br>
+  &lt;/span>
+  &lt;span itemprop="geo">34.052339;-118.410623&lt;/span>
+ &lt;/p>
+ &lt;h2>Assorted Contact Methods&lt;/h2>
+ &lt;ul>
+  &lt;li itemprop="tel" item>&lt;span itemprop="value">+1 (310) 597
+  3781&lt;/span> &lt;span itemprop="type">work&lt;/span>&lt;/li>
+  &lt;li>&lt;a itemprop="url"
+  href="http://en.wikipedia.org/wiki/Jack_Bauer">I'm on
+  Wikipedia&lt;/a> so you can leave a message on my user talk
+  page.&lt;/li>
+  &lt;li>&lt;a itemprop="url"
+  href="http://www.jackbauerfacts.com/">Jack Bauer Facts&lt;/a>&lt;/li>
+  &lt;li itemprop="email">&lt;a
+  href="mailto:j.bauer@la.ctu.gov.invalid">j.bauer@la.ctu.gov.invalid&lt;/a>&lt;/li>
+  &lt;li itemprop="tel" item>&lt;span itemprop="value">+1 (310) 555
+  3781&lt;/span> &lt;span>&lt;meta itemprop="type" content="cell">mobile
+  phone&lt;/span>>&lt;/li>
+ &lt;/ul>
+ &lt;p itemprop="note">If I'm out in the field, you may be better
+ off contacting &lt;span itemprop="agent" item="vcard">&lt;a
+ itemprop="email" href="mailto:c.obrian@la.ctu.gov.invalid">&lt;span
+ itemprop="fn">Chloe O'Brian&lt;/span>&lt;/a>&lt;/span> if it's about
+ work, or ask &lt;span itemprop="agent">Tony Almeida&lt;/span> if
+ you're interested in the CTU five-a-side football team we're
+ trying to get going.&lt;/p>
+ &lt;ins datetime="2008-07-20T21:00:00+0100">
+  &lt;span itemprop="rev" item>
+   &lt;meta itemprop="type" content="date-time">
+   &lt;meta itemprop="value" content="2008-07-20T21:00:00+0100">
+  &lt;/span>
+  &lt;p itemprop="tel" item>&lt;strong>Update!&lt;/strong>
+  My new &lt;span itemprop="type">home&lt;/span> phone number is
+  &lt;span itemprop="value">01632 960 123&lt;/span>.
+ &lt;/ins>
+&lt;/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>
 &lt;address item=vcard>
  &lt;strong title="fn">Alfred Person&lt;/strong> &lt;br>
  &lt;span itemprop="adr" item>
@@ -48042,8 +48104,10 @@
   &lt;span itemprop="locality">Mountain View&lt;/span>,
    &lt;span itemprop="region">CA&lt;/span> &lt;span itemprop="postal-code">94043&lt;/span>
  &lt;/span>
-&lt;/address>
--->
+&lt;/address></pre>
+
+  </div>
+
 
 
   <h4>vEvent</h4>
@@ -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 &lt; 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,13 +49666,31 @@
   </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>&lt;article id="friend">
+ &lt;h1>Friend in the kingdom&lt;/h1>
+ &lt;p>I got a friend in the kingdom, ain't that good news?&lt;/p>
+ &lt;footer>
+  &lt;p item=bibtex>Cite as:
+   &lt;meta itemprop="entrytype" content="article">
+   &lt;span itemprop="author">Nerissa Nields and Katryna Nields&lt;/span>
+   &lt;span itemprop="title">Friend in the Kingdom&lt;/span>
+   &lt;span itemprop="journal">Ain't That Good News&lt;/span>
+   &lt;span itemprop="year">2009&lt;/span>
+   &lt;span itemprop="month">April&lt;/span>
+   &lt;link itemprop="url" href="#friend"> &lt;!-- relative url to this page -->
+  &lt;/p>
+ &lt;/footer>
+&lt;/article></pre>
+
+  </div>
 
--->
 
 
   <h4>RDF</h4>
@@ -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,