From: Nicholas Wieland Date: 2008-12-30T11:03:37+09:00 Subject: Re: What you do when dealing with a huge number of conditions ? Damn, don't know what happened ... Is it because the mail is signed by thawte ? This was my post Hi *, I need to deal with microformats, I would like to write a lib that covers the most common. As the microformat idea is useful and well thought, as the implementation can become a truckload of crap, a microformat changes when different data is submitted, and can have countless variations. For hcard I found a rails plugin, and as I thought it's basically a set of if/else conditions dealing with different combinations. You can take a peek here:http://rubyurl.com/ARJR To add mess to the mess, it's not just a matter of data representation, data is "interlocked", for example there's a rule to optimize the fn element (the name representation, not implemented on microformats_helper): if given-name is == to the organization name, probably it's a nickname, so it should be represented with ngw . I would like to have some suggestion how to make it without writing too much spaghetti (even if I'm italian :p). Thoughts ? ngw