Please excuse some self-promotion :), I'm just celebrating that this finally has a permanent address I can link to when blogging about bad browser sniffing..
http://dev.opera.com/articles/view/using-capability-detection/
Article discussion is open and already getting interesting comments. I hope you'll also dissect and criticise the actual "demo script" attached to the article (not that I expect anyone to use that script verbatim, it's the ideas it tries to implement that matter).