hcard-implied-brainstorming

From Microformats Wiki
Revision as of 20:57, 8 December 2006 by RCanine (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Implied hCard Brainstorming

These are ideas for solutions to implied-hcards. See implied-hcard-examples for use cases.

Initial ideas

The rule could be similar to:

If a an element with class=vcard does not have any hCard class names, imply the entire content as an fn field, and attempt to apply the implied "n" optimization.

Optionally, if the root element has @href, imply a class="url".

For example:

<a class="vcard" href="http://ryancannon.com/">Ryan Cannon</a>

becomes

BEGIN:VCARD
N:Cannon;Ryan;;;
FN:Ryan Cannon
URL:http\://ryancannon.com/
END:VCARD

All this is possible because it requires an hCard without hCard markup inside.

This is fairly powerful for a few reasons:

  • It does not require in-depth knowledge of hCard or vCard
  • Extraordinarily simple markup
  • Provides a smaller barrier-to-entry for microformats that require hCard

--Ryan Cannon