List Info

Thread: Is class="vcard fn" illegal?




Is class="vcard fn" illegal?
user name
2006-11-25 19:19:07
Is it perhaps useful to talk about implied vcards? 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://ryancanno
n.com/">Ryan Cannon</a>

becomes

BEGIN:VCARD
N:Cannon;Ryan;;;
FN:Ryan Cannon
URL:http://www.perich.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

Once I started working with compound microformats (hresume,
hreview,  
hatom, hcite) I began to find all of the additional mark-up 

cumbersome, especially for very simple vCards and where most
of the  
code had to be written by hand.

-- 
Ryan

http://RyanCannon.com



On Nov 25, 2006, at 7:03 AM, microformats-discuss- 
requestmicroformats.org wrote:

>> <cite class="vcard fn">Mr. John Q.
Public, MD</cite>
>>
>> Why is it not legal?
>>
>> I thought that I could optimize using multiple
property names in a
>> class attribute?
>>
>> I guess I don't understand when multiple property
names can and  
>> cannot
>> be used in a class attribute.  Would someone please
explain the rule?
>>
>> /Roger
>
> There is an hCard FAQ about this:
> http://microforma
ts.org/wiki/hcard- 
> faq#Can_you_mix_properties_and_the_root_class_name
>
> if you don't understand/agree with the Q/A please let
us know so we
> can better explain why this is not possible.
>
> -brian

_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
Is class="vcard fn" illegal?
user name
2006-11-25 20:12:45
In message <F15C4670-805A-413B-8C00-83EF1DFC67C1ryancannon.com>, Ryan
Cannon <ryanryancannon.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://ryancanno
n.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:ryanexample.com"
class="vcard">
        Ryan Cannon
        <a>

would be OK, but what about:

        <a href="mailto:ryanexample.com"
class="vcard">
        ryanexample.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.freeourd
ata.org.uk>
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
Is class="vcard fn" illegal?
user name
2006-11-30 19:22:54
On Nov 25, 2006, at 11:19 AM, Ryan Cannon wrote:

> Is it perhaps useful to talk about implied vcards? 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".
>
> ...

I don't have any initial opposition to this, but I think
some  
research could help. Could you collect examples from the
wild where  
this optimization would help?

-ryan

_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )