I guess the question is why do you want to do this. You'll need to spread the frame (not a big deal but it is a job) and you won't end up with better gearing than with a 3 by 7.
Edit: I think this is a useful discussion of the trade-offs between a compact and a triple:
http://www.bikehugger.com/post/view/...-compact-crank.