Mixing Groupsets: Front & Rear Can you use a (e.g.) SRAM rear derailleur with a SRAM casette with a (e.g.) Shimano front derailleur with Shimano Chainrings?
Anecdotal accounts say "yes, you can mix within reason".

The manufacturers, however, will generally say a firm "no". On the one hand, they would, wouldn't they? They're in the business of selling kit. With road groupsets, there is Shimano, the main player. Then there is SRAM, who make their components to be largely compatible with Shimano. Lastly, among the main manufacturers, there is Campagnolo, who are compatible with...Campagnolo. For mountain bikes, things are a little different. Shimano still dominate, more arguably,, but SRAM's policy has generally been to buy existing, established brands. At this point I'm guessing somewhat, but I think incompatibility is the general state. Campagnolo aren't even players in the mountain bike marketplace.

With all systems, the width of the outside of thechain really drives everything else. Hopefully you can imagine, as you start putting more and more gears on the back, each cog must sit closer to its neighbour, and so the thinner the chain must become. This follows through to other components also. One of the most critical things is the rear derailleur, which is designed to shift the chain a certain distance every time you change gear. You can imagine that only the derailleur made for that number of gears will shift the chain the correct distance. If you mix this, the distance will not be quite right, although we're talking tenths of mm here between each gear.  So whilst the shifting is not perfect, you may judge it to be "good enough" by your standards. In that sense, it's a judgement call.

Lennard Zinn, who has authored a few excellent books on bike maintenance, has also written quite a bit on mixing over on Velonews.