[microformats-discuss] Re: Formating Organizations

brian suda brian.suda at gmail.com
Tue Sep 6 10:32:01 PDT 2005


Jacob Ham wrote:

> Anyway, I am trying to create a simple Rails app to handle my
> contacts.  It is basically for me to learn Rails, and introduce myself
> with microformats in the process.  My contact app has the ability to
> add just organizations.  When they view the organization, I have it in
> hCard format.  This is what I have come up with because the hCard wiki
> is unclear on organization specs.
>
Ryan is right, FN is manditory, so it shouldn't be left blank. His way
of condensing the two is probably your best option. There is a
discussion about how to encode companies in vCards, even the RFC spec
does not give an example. (I think) on the hcard-issues pages (or maybe
FAQs) there is a question about this, if not then you should please add
it with your example so the community can try to work-out the best way
to encode it.

> <div class="vcard">
>  <a class="url fn" href="http://www.microsoft.com"
> <http://www.microsoft.com%22>></a>
>  <div class="org">Microsoft Corp</div>
>  <div class="adr">
>   <div class="street-address">One Microsoft Way</div>
>   <span class="locality">Redmond</span>,
>   <span class="region">WA</span>
>   <span class="postal-code">98052</span>
>  </div>
>  <div class="tel">1-800-642-7676</div>
>  <div class="fax">1-425-936-7329</div>
> </div>
>
> My other question is by adding a link to internal operations for the
> organization (i.e. org details) would break the hcard?
>
> Like:
>
> <div class="org"><a href="interal/show/123">Microsoft Corp</a></div>

--- X2V will not break, it will use the Node value of < ...
class="org">...</..> and in this case, since the <a> node value is the
same as the divs this will be fine. I can't speak for other
implementations, but this is how it should work.

Crap, ryan king just beat me to responding, but i'll send it anyway...

-brian


More information about the microformats-discuss mailing list