[uf-discuss] hcard noobie question
Ryan King
ryan at technorati.com
Wed Apr 5 16:21:29 PDT 2006
On Apr 5, 2006, at 3:59 PM, Nick Swan wrote:
> Hi all,
>
> noobie hcard question here! Sorry!!!
>
> So I have my hcard I have created :
>
> <div class="vcard">
> <a class="url fn" href="http://weblog.vb-tech.com/nick">Nick Swan</a>
> <div class="org">Dot Net Solutions</div>
> <div class="adr">
> <div class="street-address">Sheet Street</div>
> <span class="locality">Windsor</span>,
> <span class="region">Berks</span>
> <span class="postal-code">SL4</span>
> </div>
> <div class="tel">07866 567042</div>
> </div>
>
> and I want to paste it into Ray Ozzies Live Clipboard demo.
>
> I can't though because the demo splits names up completely
> differently ie:
> <div class="n">
> <span class="given-name">Nick</span>
> <span class="family-name">Swan</span>
> </div>
>
> For me to consume hcards this is ok as I can parse them many
> different ways to see which one works, but how am I supposed to
> know which format to copy the data in to be able to paste it
> somewhere else?
>
> I though the idea of hcard was to come up with a standard format?
It is, don't worry. :D
What you're encountering here is the implied-n-optimization [http://
microformats.org/wiki/hcard#Implied_.22n.22_Optimization]. In the
First example, you're using the optimization to express n (the
structured name). In the last example, the structure of n is
expressed explicitly.
Either method should work with a proper hcard parser.
/me goes back to writing hcard test cases. :D
-ryan
--
Ryan King
ryan at technorati.com
More information about the microformats-discuss
mailing list