Skip to content

Commit

Permalink
[cgiowt] (0) Remove the magic from the vCard vocabulary, since the ma…
Browse files Browse the repository at this point in the history
…gic doesn't really work.

git-svn-id: http://svn.whatwg.org/webapps@4981 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 7, 2010
1 parent de4ca4d commit 2dac86c
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 574 deletions.
217 changes: 43 additions & 174 deletions complete.html
Expand Up @@ -181,7 +181,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 6 April 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 7 April 2010</h2>
</hgroup><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>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -49713,61 +49713,9 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>
<code title=md-vcard-n-honorific-suffix><a href=#md-vcard-n-honorific-suffix>honorific-suffix</a></code>
properties.</p>

<p>Except when one of the conditions given below applies, exactly
one property with the name <code title=md-vcard-n><a href=#md-vcard-n>n</a></code> must
be present within each <a href=#concept-item title=concept-item>item</a> with
the type <code title=md-vcard><a href=#md-vcard>http://microformats.org/profile/hcard</a></code>.</p>
<p>Exactly one property with the name <code title=md-vcard-n><a href=#md-vcard-n>n</a></code> must be present within each <a href=#concept-item title=concept-item>item</a> with the type <code title=md-vcard><a href=#md-vcard>http://microformats.org/profile/hcard</a></code>.</p>

<p>If one of the following conditions does apply, then the <code title=md-vcard-n><a href=#md-vcard-n>n</a></code> may be omitted:</p>

<dl><dt>The <a href=#concept-item title=concept-item>item</a> with the type
<code title="">vcard</code> has both an <code title=md-vcard-fn><a href=#md-vcard-fn>fn</a></code> property and an <code title=md-vcard-org><a href=#md-vcard-org>org</a></code> property, and they both have
<a href=#concept-property-value title=concept-property-value>values</a> that are
strings and those strings are identical when compared in a
<a href=#case-sensitive>case-sensitive</a> manner.</dt>

<dd>

<p>The contact information must be for an organization.</p>

</dd>

<dt>The <a href=#concept-item title=concept-item>item</a> with the type
<code title="">vcard</code> has an <code title=md-vcard-fn><a href=#md-vcard-fn>fn</a></code> property whose <a href=#concept-property-value title=concept-property-value>value</a> consists of a string
with zero <a href=#space-character title="space character">space
characters</a>.</dt>

<dd>

<p>The <a href=#concept-property-value title=concept-property-value>value</a> of the
<code title=md-vcard-fn><a href=#md-vcard-fn>fn</a></code> property must be a
nickname.</p>

</dd>

<dt>The <a href=#concept-item title=concept-item>item</a> with the type
<code title="">vcard</code> has an <code title=md-vcard-fn><a href=#md-vcard-fn>fn</a></code> property whose <a href=#concept-property-value title=concept-property-value>value</a> consists of a string
with exactly one sequence of <a href=#space-character title="space character">space
characters</a>, which occurs neither at the immediate start
nor the immediate end of the string.</dt>

<dd>

<p>The <a href=#concept-property-value title=concept-property-value>value</a> of the
<code title=md-vcard-fn><a href=#md-vcard-fn>fn</a></code> property must be a name in
one of the following forms:</p>

<ul class=brief><li>Last, First</li>

<li>Last F.</li>

<li>Last F</li>

<li>First Last</li>

</ul></dd>

</dl></dd>
</dd>

<dt><dfn id=md-vcard-n-family-name title=md-vcard-n-family-name><code>family-name</code></dfn> (inside <code title=md-vcard-n><a href=#md-vcard-n>n</a></code>)</dt>

Expand Down Expand Up @@ -50844,9 +50792,6 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>
the vCard text string</a> of that <a href=#global-identifier>global identifier</a>
as the value to <var title="">output</var>.</li>

<li><p>Let <var title="">first-n</var>, <var title="">first-org</var>, and <var title="">first-fn</var> be
null.</li>

<li>

<p>For each element <var title="">element</var> that is <a href=#the-properties-of-an-item title="the properties of an item">a property of the item</a>
Expand All @@ -50868,9 +50813,7 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>

<dd>

<ol><li><p>If <var title="">first-n</var> is null, let <var title="">first-n</var> be <var title="">element</var>.</li>

<li><p>Let <var title="">value</var> be the empty
<ol><li><p>Let <var title="">value</var> be the empty
string.</li>

<li><p>Append to <var title="">value</var> the result of
Expand Down Expand Up @@ -50972,9 +50915,7 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>

<dd>

<ol><li><p>If <var title="">first-org</var> is null, let <var title="">first-org</var> be <var title="">element</var>.</li>

<li><p>Let <var title="">value</var> be the empty
<ol><li><p>Let <var title="">value</var> be the empty
string.</li>

<li><p>Append to <var title="">value</var> the result of
Expand Down Expand Up @@ -51040,15 +50981,7 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>

<dd>

<ol><li>

<p>If <var title="">name</var> is <code title=md-vcard-fn><a href=#md-vcard-fn>fn</a></code> and <var title="">first-fn</var> is null, let <var title="">first-fn</var> be <var title="">element</var>.</p>

<p>Otherwise, if <var title="">name</var> is <code title=md-vcard-org><a href=#md-vcard-org>org</a></code> and <var title="">first-org</var> is null, let <var title="">first-org</var> be <var title="">element</var>.</p>

</li>

<li><p>Let <var title="">value</var> be the property's <a href=#concept-property-value title=concept-property-value>value</a>.</li>
<ol><li><p>Let <var title="">value</var> be the property's <a href=#concept-property-value title=concept-property-value>value</a>.</li>

<li><p>If <var title="">element</var> is one of the <a href=#url-property-elements>URL
property elements</a>, add a parameter with the name "<code title="">VALUE</code>" and the value "<code title="">URI</code>" to <var title="">parameters</var>.</li>
Expand Down Expand Up @@ -51097,89 +51030,6 @@ <h4 id=vcard><span class=secno>5.4.1 </span>vCard</h4>

</ol></li>

<li>

<p>If <var title="">first-n</var> is null, then run the following
substeps:</p>

<ol><li><p>If <var title="">first-fn</var> is also null, then skip
the remainder of these substeps.</li>

<li><p>If <var title="">first-fn</var> has a <a href=#concept-property-value title=concept-property-value>value</a> that is an <a href=#concept-item title=concept-item>item</a>, then skip the remainder of
these substeps.</li>

<li><p>If <var title="">first-org</var> is not null, and the
<a href=#concept-property-value title=concept-property-value>value</a> of <var title="">first-org</var> is not an <a href=#concept-item title=concept-item>item</a> and is equal to <var title="">first-fn</var>, then <a href=#add-a-vcard-line>add a vCard line</a> with
the type "<code title="">N</code>" whose value is four U+003B
SEMICOLON characters ("<code title="">;;;;</code>") to <var title="">output</var>. Then, skip the remainder of these
substeps.</li>

<li><p>If the <a href=#space-character title="space character">space
characters</a> in <var title="">first-fn</var>, if any, are
not all contiguous, then skip the remainder of these
substeps.</li>

<li><p><a href=#split-a-string-on-spaces title="split a string on spaces">Split <var title="">first-fn</var> on spaces</a>, and let <var title="">part one</var> be the first resulting token, and <var title="">part two</var> be the second, if any, or the empty
string if there is no second token. (There cannot be three, given
the previous step.)</li>

<li>

<p>If the last character of <var title="">part one</var> is a
U+002C COMMA character (,), then remove that character from <var title="">part one</var> and <a href=#add-a-vcard-line>add a vCard line</a> with
the type "<code title="">N</code>" whose value is the
concatenation of the following strings:</p>

<ol class=brief><li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part one</var></li>
<li>A U+003B SEMICOLON character (;)</li>
<li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part two</var></li>
<li>Three U+003B SEMICOLON characters (;)</li>
</ol><p>Then, skip the remainder of these substeps.</p>

</li>

<li>

<p>If <var title="">part two</var> is two Unicode code-points
long and its second character is a U+002E FULL STOP character
(.), then <a href=#add-a-vcard-line>add a vCard line</a> with the type "<code title="">N</code>" whose value is the concatenation of the
following strings:</p>

<ol class=brief><li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part one</var></li>
<li>A U+003B SEMICOLON character (;)</li>
<li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> consisting of the first character of <var title="">part two</var></li>
<li>Three U+003B SEMICOLON characters (;)</li>
</ol><p>Then, skip the remainder of these substeps.</p>

</li>

<li>

<p>If <var title="">part two</var> is one Unicode code-point
long, then <a href=#add-a-vcard-line>add a vCard line</a> with the type "<code title="">N</code>" whose value is the concatenation of the
following strings:</p>

<ol class=brief><li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part one</var></li>
<li>A U+003B SEMICOLON character (;)</li>
<li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part two</var></li>
<li>Three U+003B SEMICOLON characters (;)</li>
</ol><p>Then, skip the remainder of these substeps.</p>

</li>

<li>

<p><a href=#add-a-vcard-line>Add a vCard line</a> with the type "<code title="">N</code>" whose value is the concatenation of the
following strings:</p>

<ol class=brief><li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part two</var></li>
<li>A U+003B SEMICOLON character (;)</li>
<li>The result of <a href=#escaping-the-vcard-text-string>escaping the vCard text string</a> <var title="">part one</var></li>
<li>Three U+003B SEMICOLON characters (;)</li>
</ol></li>

</ol></li>

<li><p><a href=#add-a-vcard-line>Add a vCard line</a> with the type "<code title="">END</code>" and the value "<code title="">VCARD</code>"
to <var title="">output</var>.</li>

Expand Down Expand Up @@ -51329,6 +51179,10 @@ <h5 id=examples-1><span class=secno>5.4.1.2 </span>Examples</h5>

<pre>&lt;section id="jack" itemscope itemtype="http://microformats.org/profile/hcard"&gt;
&lt;h1 itemprop="fn"&gt;Jack Bauer&lt;/h1&gt;
&lt;div itemprop="n"&gt;
&lt;meta itemprop="given-name" content="Jack"&gt;
&lt;meta itemprop="family-name" content="Bauer"&gt;
&lt;/div&gt;
&lt;img itemprop="photo" alt="" src="jack-bauer.jpg"&gt;
&lt;p itemprop="org" itemscope&gt;
&lt;span itemprop="organization-name"&gt;Counter-Terrorist Unit&lt;/span&gt;
Expand Down Expand Up @@ -51362,8 +51216,11 @@ <h5 id=examples-1><span class=secno>5.4.1.2 </span>Examples</h5>
&lt;p itemprop="note"&gt;If I'm out in the field, you may be better off contacting &lt;span
itemprop="agent" itemscope itemtype="http://microformats.org/profile/hcard"&gt;&lt;a
itemprop="email" href="mailto:c.obrian@la.ctu.gov.invalid"&gt;&lt;span
itemprop="fn"&gt;Chloe O'Brian&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; if it's about work, or ask &lt;span
itemprop="agent"&gt;Tony Almeida&lt;/span&gt; if you're interested in the CTU five-a-side football team we're trying to get going.&lt;/p&gt;
itemprop="fn"&gt;&lt;span itemprop="n" itemscope&gt;&lt;span
itemprop="given-name"&gt;Chloe&lt;/span&gt; &lt;span
itemprop="family=name"&gt;O'Brian&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;
if it's about work, or ask &lt;span itemprop="agent"&gt;Tony Almeida&lt;/span&gt;
if you're interested in the CTU five-a-side football team we're trying to get going.&lt;/p&gt;
&lt;ins datetime="2008-07-20T21:00:00+01:00"&gt;
&lt;span itemprop="rev" itemscope&gt;
&lt;meta itemprop="type" content="date-time"&gt;
Expand All @@ -51388,7 +51245,8 @@ <h5 id=examples-1><span class=secno>5.4.1.2 </span>Examples</h5>
components:</p>

<pre>&lt;address itemscope itemtype="http://microformats.org/profile/hcard"&gt;
&lt;strong itemprop="fn"&gt;Alfred Person&lt;/strong&gt; &lt;br&gt;
&lt;strong itemprop="fn"&gt;&lt;span itemprop="n"&gt;&lt;span itemprop="given-name"&gt;Alfred&lt;/span&gt;
&lt;span itemprop="family-name"&gt;Person&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt; &lt;br&gt;
&lt;span itemprop="adr" itemscope&gt;
&lt;span itemprop="street-address"&gt;1600 Amphitheatre Parkway&lt;/span&gt; &lt;br&gt;
&lt;span itemprop="street-address"&gt;Building 43, Second Floor&lt;/span&gt; &lt;br&gt;
Expand All @@ -51405,10 +51263,15 @@ <h5 id=examples-1><span class=secno>5.4.1.2 </span>Examples</h5>
names:</p>

<pre>&lt;span itemscope itemtype="http://microformats.org/profile/hcard"
&gt;&lt;span itemprop=fn&gt;George Washington&lt;/span&gt;&lt;/span&gt;</pre>

<p>This creates a single item with a single name-value pair, with
the name "fn" and the value "George Washington". This is defined to
&gt;&lt;span itemprop=fn&gt;&lt;span itemprop="n"&gt;&lt;span itemprop="given-name"
&gt;George&lt;/span&gt; &lt;span itemprop="family-name"&gt;Washington&lt;/span&gt;&lt;/span
&gt;&lt;/span&gt;&lt;/span&gt;</pre>

<p>This creates a single item with a two name-value pairs, one with
the name "fn" and the value "George Washington", and the other with
the name "n" and a second item as its value, the second item having
the two name-value pairs "given-name" and "family-name" with the
values "George" and "Washington" respectively. This is defined to
map to the following vCard:</p>

<pre>BEGIN:VCARD
Expand Down Expand Up @@ -52799,9 +52662,11 @@ <h4 id=json><span class=secno>5.5.1 </span>JSON</h4>

<pre>&lt;p&gt;
Both
&lt;span itemscope itemtype="http://microformats.org/profile/hcard" itemref="home"&gt;&lt;span itemprop="fn"&gt;Princeton&lt;/span&gt;&lt;/span&gt;
&lt;span itemscope itemtype="http://microformats.org/profile/hcard" itemref="home"&gt;&lt;span itemprop="fn"
&gt;&lt;span itemprop="n" itemscope&gt;&lt;span itemprop="given-name"&gt;Princeton&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
and
&lt;span itemscope itemtype="http://microformats.org/profile/hcard" itemref="home"&gt;&lt;span itemprop="fn"&gt;Trekkie&lt;/span&gt;&lt;/span&gt;
&lt;span itemscope itemtype="http://microformats.org/profile/hcard" itemref="home"&gt;&lt;span itemprop="fn"
&gt;&lt;span itemprop="n" itemscope&gt;&lt;span itemprop="given-name"&gt;Trekkie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
live at
&lt;span id="home" itemprop="adr" itemscope&gt;&lt;span itemprop="street-address"&gt;Avenue Q&lt;/span&gt;.&lt;/span&gt;
&lt;/p&gt;</pre>
Expand All @@ -52812,18 +52677,22 @@ <h4 id=json><span class=secno>5.5.1 </span>JSON</h4>

<pre class=turtle>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix dct: &lt;http://purl.org/dc/terms/&gt; .
@prefix hcard: &lt;http://www.w3.org/1999/xhtml/microdata#http%3A%2F%2Fmicroformats.org%2Fprofile%2Fhcard%23%3A&gt; .
@prefix hcard: &lt;http://www.w3.org/1999/xhtml/microdata#http://microformats.org/profile/hcard%23:&gt; .

&lt;&gt; &lt;http://www.w3.org/1999/xhtml/microdata#item&gt; _:n0 ;
&lt;http://www.w3.org/1999/xhtml/microdata#item&gt; _:n1 .
_:n0 rdf:type &lt;http://microformats.org/profile/hcard&gt; ;
hcard:fn "Princeton" ;
hcard:adr _:n2 .
_:n1 rdf:type &lt;http://microformats.org/profile/hcard&gt; ;
hcard:fn "Trekkie" ;
hcard:adr _:n2 .
_:n2 hcard:adr%20street-address "Avenue Q" ;
hcard:adr%20street-address "Avenue Q" .</pre>
_:n0 rdf:type &lt;http://microformats.org/profile/hcard&gt; ;
hcard:fn "Princeton" ;
hcard:n _:n0a
hcard:adr _:n2 .
_:n0a hcard:n%20given-name "Princeton" .
_:n1 rdf:type &lt;http://microformats.org/profile/hcard&gt; ;
hcard:fn "Trekkie" ;
hcard:n _:n1a
hcard:adr _:n2 .
_:n1a hcard:n%20given-name "Trekkie" .
_:n2 hcard:adr%20street-address "Avenue Q" ;
hcard:adr%20street-address "Avenue Q" .</pre>

</div>

Expand Down

0 comments on commit 2dac86c

Please sign in to comment.