It lives under the passenger side bonnet airbag, this thread has some info on where and how to remove it.
https://www.jaguarforum.com/threads/battery-backed-alarm-sounder-on-2009-xf.137906/#post-1508667
These are the ones I bought, David. All solid, fit perfectly and still look good today with no signs of rusting.
https://www.ebay.co.uk/itm/20x-ALLO...rentrq:731334ab16d0a4b7b67e7f6dff7a4b99|iid:1
Fuse F16 40A feeding through relay RLY 11 in the engine junction box. If there is power going through then check the LH connector, probably in the ‘A’ post.
No need to remove the battery for charging. Connect the CTEK to the positive of the battery and the negative to a ground point and you’ll be perfectly ok.
Here you go,
https://www.ebay.co.uk/itm/LEFT-HEADLIGHT-ASSEMBLY-LJA4503AG-Jaguar-XK8-XKR-X100-1996-2006-0577/404010537754?var=0&mkcid=1&mkrid=710-53481-19255-0&campid=5338343596&toolid=10001&customid=eb:g:vms:eb:p:404010537754;EAIaIQobChMIl6bxp7fq-wIVUtDtCh18SwwREAQYBiABEgJWjvD_BwE&gclid=EAIaIQobChMIl6bxp7fq-wIVUtDtCh18SwwREAQYBiABEgJWjvD_BwE&pageci=f47d98cb-157e-467d-8fd5-4ba51ff32ea3&redirect=mobile
The relays may well be the soldered in type below the grill in your picture.
If you’ve found the fuses, switch them on and check for power at the fuses.
To drain a battery that quick would require a huge amount of current. I suggest you do not connect another battery until you have carried out some fault finding.
Main cables, spare wheel well, front water drains and then the various modules.