From: Nicholas Wieland Date: 2008-12-31T01:20:52+09:00 Subject: Re: What you do when dealing with a huge number of conditions ? Il giorno 30/dic/08, alle ore 16:09, usenet@singpolyma.net ha scritto: >>>> I need to deal with microformats, I would like to write a lib that >>>> covers the most common. >>> >>> Do you want to output microformats, or parse them? >> Output, as the file I linked very clearly does. > > Well, in that case, there's no real need for a library at all... > microformats are just a good use of the (X)HTML markup you already > have... just add attributes to the right parts of your template. > > fn optimization, etc, are there specifically to make this sort of > thing > eaiser and more intuitive. Not something you should have to worry > about. Well, not really. Most of optimizations are made at the markup side, this basically means that when you know your data, you can spare some markup and add readability by applying these markup optimizations. Unfortunately, just for the nickname optimization, code looks something like that: if organization == given-name && !url given-name elsif organization == given-name && url given-name end Before this, all the cases when the given-name is the same of organization, but there's a family-name. I'm trying something right now, for most simple cases (rel-licence, rel-tag). ngw -- http://www.nofeed.org