The markup currently produced by the module use add the 'vcard' class to the div enclosing the full address.
As per the existing microformat specifications, shouldn't the 'adr' class be used ? 'vcard' is for the 'hCard' microformat (http://microformats.org/wiki/hcard). For addresses, the recommended markup is to use the 'adr' class (see http://microformats.org/wiki/adr). The oly change the the current release is to edit addresses.inc line 618 to change the class. Also, since the city div should use the 'locality' class and not the 'city' one, a change is required on line 642.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | addresses.inc_.patch | 530 bytes | pbuyle |
Comments
Comment #1
brmassa commentedPierre,
instead of replacing these classes, i added. Im relying on you for this fix.
soon on the next version.
regards
massa
Comment #2
pbuyle commentedThanks.
According to the hCard specification a 'vcard' element must contain exactly one 'fn' element (a 'formatted name'). If hCard compliance is not a goal, this is not an issue. Otherwise, addresses without a 'fn' element shouldn't have the 'vcard' class.
If you want to keep the 'vcard' class on the main element but reach hCard compliance, a 'fn' element should be provided. If the address has an name ('aname' field), adding a 'fn org' class attribute to its element should be enough. If the address doesn't have a name, either the 'vcard' class should be dropped or an hidden element with some default name must be created. For these 'fn' elements, the 'org' class is required to let parsers know the hCard represents contact information for a company, organization or place (see http://microformats.org/wiki/hcard#Organization_Contact_Info).
The simple attached patch (done as an exercice to refresh my CVS knowledge :)) add the vcard class only if an address name is provided and set the class of address name's element to 'fn org'.
Since 'city' is not an hCard property, leaving it in the city element should not be a problem.
Comment #3
brmassa commentedPierre,
great. patch commited!
regards,
massa
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.