First confirm that it is in fact the fuel pump. There are several other possibilities that are simple to check before you launch into a major project.
1. The fuel pump is located in the fuel tank which is located behind the rear seat. Check to see if you can hear the fuel pump running when you first turn the key on. It will make a low volume whirring noise for 2-3 seconds before shutting off. Test it in a quiet location such as your garage and try it several times to see if you hear it. If you don't hear it, it may not be getting power.
2. There are several components that can interrupt the power. A fuse, a relay, and the fuel cutoff switch. The fuel cutoff switch is located at the top of the kick panel on the passenger's side of the XJS. There is a small snap-off cover covering the actual switch. Check to make sure the black button is pushed down. If that isn't it, you should check the relay and fuse which are both located in the passenger's side of the trunk/boot. It is beyond the scope of this answer to give you explicit info on their location but you need the electrical diagrams or advice from someone who knows their locations.
If you still can't hear the fuel pump running, you are probably on the road to replacing it and see my tips on that later.
If the fuel pump is running, the next easiest item to check/replace is the fuel filter. The fuel filter is located under the driver's side, front wheel well. If you don't want to jack up the car, you can get at it by turning the steering wheel all the way clockwise. There is a plastic shroud covering that can be easily removed the get at the fuel filter. I would just replace it to be on the safe side but while you have it out of the vehicle, you should check the fuel pressure. Borrow, rent, or buy a fuel pressure gauge and check that you have around 35-40 psi at at the inlet line to the fuel filter. 10-20 psi is too low even though the car may start but not run very well. If you have 0 or low psi AND you have eliminated all the other items, you are probably want move ahead with changing the pump and/or fuel pump canister.
More to follow......
The fuel pump is in the fuel tank.
In the boot, under the battery
The fuel pump is mounted on top and inside the fuel tank. On most vehicles you must remove the fuel tank in order to access the pump. But on some vehicles there is an access panel inside the vehicle just above the fuel pump.
Under the battery in the boot/trunk. Later cars had the pump inside the fuel tank, on the top in the middle.
It's in the trunk behind the spare inside the tank.
Fuel Fault 22: Fuel pump drive circuit. Checks for short or open circuit to pump relay. There's a full list of fault codes here: http://www.jagweb.com/aj6eng/fault_codes.php
fuel filter is under the rear end of the car just above/next to the left hand side exhaust silencer
If you are looking for the fuel cutoff relay, sometimes called the "fuel inertia switch", on my 1994 XJS it is located on the passenger side....open the door...and you'll see a small plastic box just below the dash on the kick panel. There's a hole at the top to reset the switch or you can take the cover off to make sure the switch is depressed. This switch is supposed to shut off the fuel pump in case of an accident but sometimes it shuts off when hitting a sharp bump or you take a very sharp turn.
I have a 88 jag xjs v12 and the gas tank is a 21 gallon.
25 us gal.