[uf-discuss] vcard fn for name in "A. B. Smith" format
Brian Suda
brian.suda at gmail.com
Mon Aug 28 19:34:03 PDT 2006
Good Question Andy, you have several potential quirks with the string
"A. B. Smith".
I am assuming 'A' is an abberiviation for a first name? 'B' is a
middle name, and 'Smith' is the last name you can do the following:
First, just like all names in hCard we need to create an 'FN'
container inside a vcard.
<div class="vcard">
<span class="fn">A. B. Smith</span>
</div>
Because your string does not fall into the 'Implied-N' category[1]
this is not enough. We need to explicitly mark-up what each portion of
the string means.
<div class="vcard">
<span class="fn n">
<span class="given-name">A</span>.
<span class="additional-name">B</span>.
<span class="family-name">Smith</span>
</span>
</div>
This gives explicit meaning to all the portions of the name and will
import into your address book just fine, but there is abit more
semantics we can add.
<div class="vcard">
<span class="fn n">
<abbr title="Andy" class="given-name">A</abbr>.
<abbr title="Brian" class="additional-name">B</abbr >.
<span class="family-name">Smith</span>
</span>
</div>
By making the initial abbreviations, it is possible to add more
meaning to the individual letters.
I hope this helps, feel free to add it to the wiki if you think this
will help more people.
Thanks,
-brian
[1] - http://microformats.org/wiki/hcard#Implied_.22n.22_Optimization
On 8/28/06, Andy Mabbett <andy at pigsonthewing.org.uk> wrote:
>
> I need to mark up a vcard for someone whose name is given as "A. B.
> Smith".
>
> I can't seem to find such an example on the wiki. How should I do so?
>
> --
> Andy Mabbett
> Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>
>
> Free Our Data: <http://www.freeourdata.org.uk>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>
--
brian suda
http://suda.co.uk
More information about the microformats-discuss
mailing list