[uf-discuss] country-code may be missing from hCard/adr spec

Brian Suda brian.suda at gmail.com
Sun Feb 25 05:10:15 PST 2007

On 2/25/07, James Craig <jcraig at apple.com> wrote:
> Sølvgade 83, opg. S
> DK-1307 København K.

hCard is modeled after the vCard RFC 2426. It uses a different system
to mark-up addresses than the ISO model. But they can easily be
combined; for example:

<div class="adr" lang="dk">
<div class="street-address">Sølvgade 83, opg. S</div>
<span class="iso-country-code"><abbr class="country-name"
title="Denmark">DK</abbr>-<span class="postal-code">1307</span></span>
<span class="locality">København</span> K.

You don't have to change the way you display your text, but you have
several choices where you can add the semantics. You can use
<div>DENMARK</div> to mark-up the country-name and ignore the DK
postal-code prefix, or vice-versa.

because ADR is modeled after the RFC it is not likely that the ISO
prefix will be added into the hCard property-List, but there is
nothing stopping you from using it in any form you need. postal-codes
are NOT just integers,

<span class="postal-code">EH9 2JT</span>

you could do:

<span class="postal-code">DK-1307</span>
DK-<span class="postal-code">1307</span>

it is a matter of preference and a matter of how consuming
applications deal with this? if i send this postal-code with the ISO
prefix to Google or Yahoo ADR->GEO services does it choke? depending
on what you intend to do with the data, that will help guide you to
how best mark-it-up.

With or without the ISO prefix, ADR works just fine.


brian suda

More information about the microformats-discuss mailing list