[uf-discuss] Implied hCard (was: Is class="vcard fn" illegal?)

Ryan Cannon ryan at ryancannon.com
Mon Nov 27 06:55:34 PST 2006


It would seem that the rule still applies: “ryan at example.com” would  
be both the FN and Nickname fields. Perhaps parsing could key on the  
protocol: mailto would imply an

EMAIL;TYPE=Internet

and http(s) would imply a URL. Any other protocols would not imply  
anything.

Should I add this to the wiki?

-- 
Ryan

http://RyanCannon.com



On Nov 26, 2006, at 2:31 PM, microformats-discuss- 
request at microformats.org wrote:

> In message <F15C4670-805A-413B-8C00-83EF1DFC67C1 at ryancannon.com>, Ryan
> Cannon <ryan at ryancannon.com> writes
>
>> 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\://www.perich.com
>> END:VCARD
>
> That seems like a good idea, so long as non-http hrefs (mailto:, tel:,
> etc.) are parsed correctly:
>
>         <a href="mailto:ryan at example.com" class="vcard">
>         Ryan Cannon
>         <\a>
>
> would be OK, but what about:
>
>         <a href="mailto:ryan at example.com" class="vcard">
>         ryan at example.com
>         <\a>
>
> ?
>
> How would existing parsers treat those examples? Would they simply
> ignore them?
>
> -- 
> Andy Mabbett
>                 Say "NO!" to compulsory ID Cards:  <http:// 
> www.no2id.net/>
>
>                 Free Our Data:  <http://www.freeourdata.org.uk>
>




More information about the microformats-discuss mailing list