O2 sensor could cause a problem like this. restricted exhaust too. If it starts back up in a few minutes or even cranks over the alternator is probably not the problem. If you lost enough power at the battery for the engine to die there won't be enough to crank the engine.
Fuel pressure, exhaust pressure, coolant temp, fuel regulator, coils, shorted injector, oxygen sensor, cam and crank and more things can cause it to stall. try to get a scanner hooked up to and see what your engine is doing just before it shuts down. look at your fuel trims, O2 sensor, cts are all doing just before it dies.