Almost classic example of fuel filter gone bad.
I had that same exact problem with a 1995 Jeep Cherokee, and it was indeed a bad oxygen sensor. Relatively cheap repair too.
try cleaning the throttle body
My girlfriends 97 was doing the same thing....it turned out to be the ignition switch.It started to stall intermittently (once every couple days)then yesterday it would not run at all unless you held the key in start position. Take a test drive and giggle the key to see if it shuts of.
There are several things which could be causing the car to stall out while driving. The most common and least difficult problem is that the spark plugs may need to be changed.
i believe your fuel pump is failing witch is located in your gas tank
the problem may be that the timing chain or belt has broken
Fuel pump going out maybe?
If the car is starving for fuel or air (low power at idle), the car will stall while turning.
It could stall if you use the rear brake while going downhill. Is this the case?
When it dies, is it a sudden stall, or does it run rough, and then die? If its sudden, it is most likely a electrical problem, but if it runs rough, or dies when accelerating, it might be mechanical. Such as the fuel lines, carb, etc.
The whistling sound coming from near the transmission could be a problem with a speed sensor. It is possible that the speed sensor is attached only at one end. This sensor has two places where it is attached.
There are several things that can cause your Jeep to stall while idling. The timing may be off or your fuel filter may be clogged.