from what I remember when I did this, a front DS out of a cherokee with the 4.0 and auto tranny will work (because the auto tranny is longer than the manual, and the 4.0 is longer than the 2.5L). This basically makes the front shaft longer because the front output shaft on the TC is physically further away from the D30.
It will only work in an XJ setup with the auto tranny, 231, and Chrysler 8.25" rear axle, because, again, the auto tranny is longer, which effectively shortens the rear shaft length, and the 8.25" pinion is about an inch longer than the D35, which shortens the distance the rear shaft has to span. This makes it pretty close to the same length as the front shaft.
I have the PORC SYE, and while I was waiting on a new shaft to be built, I swapped my front shaft to the rear, and it fit like it was made to be there from the factory. I have a 99 XJ with about 5" lift, 4.0L, 231, auto tranny, and chrysler 8.25" rear axle.
I am not certain on other possible combinations, but this is what I remember when I was researching it, and this is what worked for me.