The XJ D30 has a driver side diff and the CJ D30 has a passenger side diff, so that won't work.
The CJ D30 is fine, swap in any reasonable rear axle. You will need to deal with adapting or altering the lug bolt pattern and making sure the gear ratio matches.
Progressive Liberalism: Bringing you new ideas so wonderful, they have to include mandatory participation ......
Originally Posted by Ronald W. Reagan: Government is not the solution to our problem; Government is the problem.