using class to store type value (was Re: [uf-discuss] An Inconvenient hCard)

James Craig jcraig at apple.com
Mon Mar 26 11:39:32 PST 2007


Tantek Çelik wrote:

> Andy Mabbett wrote:
>
>> A further thought -  this wouldn't be an issue, if we had separate
>> classes, rather than one class and several types, thus:
>>
>>       <span class="tel">(514) 555-4561</span>
>>       <span class="fax">(514) 555-4562</span>
>>       <span class="cell">(514) 555-4563</span>
>>       <span class="textphone">(514) 555-4564</span>
>
> This was actually initially attempted and rejected because it  
> constituted
> storage of content in the class attribute, which is an anti-design- 
> pattern.
> The "type" in this case is essentially a "tag" on the phone number,  
> which is
> human readable content.
>
> The resolution is not in an easily discoverable place unfortunately:
> http://microformats.org/wiki/hcard-parsing#ISSUE_2

The resoluion still doesn't address the issue of localization  
(Sorry... "-sation") which is what Andy's potential solution is  
trying to address. One problem I do see with this solution however,  
is ambiguity for values like "home" on "tel" and "adr" which would be  
better suited by the class combinations "tel home", "adr home", etc.  
That class combination idea was also "attempted and rejected," in my  
humble opinion, prematurely.

James




More information about the microformats-discuss mailing list