hcard-implied: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
mNo edit summary
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<h1>Implied hCard</h1>
{{DISPLAYTITLE:Implied hCard}}


It is proposed to extend the hCard specification to include Implied [[hcard|hCards]], in order to attempt to streamline creation and markup for simple hCards by assuming information from common design patterns.
It is proposed to extend the hCard specification to include "Implied [[hcard|hCards]]", in order to streamline creation and mark-up for simple hCards by assuming information from common design patterns.
 
== Authors ==
* [http://ryancannon.com/ Ryan Cannon]


== Why? ==
== Why? ==


As microformats grow and emerge, the barrier to entry for writing them increases. Already, compound microformats such as hAtom, hResume and hReview are comprised of data from hCard, hCal, and rel-tag, and writing to the former requires knowledge of the latter even if the constructs used are quite simple. In addition, adding microformats to a Web page often requires adding a significant amount of tags to code, which often have to be added (time-consumingly) by hand. For example:
As microformats grow and emerge, the barrier to entry for writing them increases. Already, compound microformats such as hAtom, hResume and hReview are comprised of data from hCard, hCal, and rel-tag, and writing to the former requires knowledge of the latter even if the constructs used are quite simple. In addition, adding microformats to a Web page often requires adding a significant amount of tags to code, which often have to be added (time-consumingly) by hand. For example, a simple name:


<pre><nowiki>
<pre><nowiki>
<a href="http://www.example.com/">John Doe</a>
John Doe
</nowiki></pre>
</nowiki></pre>


quickly becomes:
can become:


<pre><nowiki>
<pre><nowiki>
<span class="vcard">
<span class="vcard"><span class="fn">John Doe</span></span>
<a class="url fn n" href="http://www.example.com/">
<span class="given-name">John</span>
<span class="family-name">
<span class="sort-string">D</span>oe
</span>
</a>
</span>
</nowiki></pre>
</nowiki></pre>


Which amounts to an almost 500% increase in code. For two words and a <abbr>URL</abbr>. ('''Note: this reasoning has the classic strawman argument [[logical flaw]], where an example is deliberately excessively artificially constructed in order to support a point.  Please see [[hcard-examples]] for how to minimally create an hCard from a linked person's name. [[User:Tantek|Tantek]] 11:47, 4 Jan 2008 (PST))
with 52 extra characters:
 
== Proposal ==
 
To find a way that the above transformation can be achieved (or "implied") with a single span and a single class. This ''might'' be:
 
<pre><nowiki>
<span class="vcard-fn">John Doe</span>
</nowiki></pre>
 
although other patterns are also being discussed.
 
== Original Proposer ==
* [http://ryancannon.com/ Ryan Cannon]
 
== See also ==


* For more examples, see [[hcard-implied-examples]]
* For more examples, see [[hcard-implied-examples]]
* For ideas refer to [[hcard-implied-brainstorming]]
* For ideas refer to [[hcard-implied-brainstorming]]

Latest revision as of 16:26, 18 July 2020


It is proposed to extend the hCard specification to include "Implied hCards", in order to streamline creation and mark-up for simple hCards by assuming information from common design patterns.

Why?

As microformats grow and emerge, the barrier to entry for writing them increases. Already, compound microformats such as hAtom, hResume and hReview are comprised of data from hCard, hCal, and rel-tag, and writing to the former requires knowledge of the latter even if the constructs used are quite simple. In addition, adding microformats to a Web page often requires adding a significant amount of tags to code, which often have to be added (time-consumingly) by hand. For example, a simple name:

John Doe

can become:

<span class="vcard"><span class="fn">John Doe</span></span>

with 52 extra characters:

Proposal

To find a way that the above transformation can be achieved (or "implied") with a single span and a single class. This might be:

<span class="vcard-fn">John Doe</span>

although other patterns are also being discussed.

Original Proposer

See also