Granted this is a fairly old topic, but I've just joined and thought I would make my contribution for anyone still unsure how to solve the "battery draining while parked" problem.
I bought my 2007 reg. S-Type back in August 2011 (1 previous owner, very low mileage, excellent condition etc). I drove it that summer and put it away in the garage for the winter (as I continue to do every winter). Took it out of hibernation in the following May and after driving for a short time found that the electronic parking brake wouldn't come on. I took it back in high dudgeon to the local main dealer from where I'd bought it, and the service manager was kind enough to give me about an hour of his time. He explained all about the constant drainage of the battery by the "mini-brains" of the many clever electronic units (such as the parking brake) even when the car is parked. And he added that the car's electrics are designed such that once the battery has been drained down by the various mini-brains to 12.5 volts (as far as my aged brain remembers), the system starts shutting down said electronic units in order to save the battery. Seems crazy, since a new battery is a sight cheaper than having a garage supply and fit a new parking brake (which they said was required). (And my old Saab happily cranked and fired right down as far as 7.5 volts on the battery, but it had little in the way of electronic gizmos). Anyway, the service manager helpfully suggested I buy a CTEK battery conditioner (which, he said, they give away with every new Aston Martin - 'cos most are left in the garage for many months over the winter in the UK). So I did, off Amazon. I think it's an MXS 5.0 model. (Plus, of course, I had also to buy a new battery).
The CTEK unit has 3 leads: 2 of these are permanently attached to the unit - one being a mains lead and the other, a thinner cable, being the charging lead; the third lead is separate and is a flying lead for connection to the battery. In operation the unit charging lead is plugged into the battery flying lead, and the unit is plugged into the mains. To set up the CTEK system in the car, I permanently connected the separate flying lead to the car battery terminals, and routed the lead so that it pokes out from the side panel inside the boot by the battery and lies permanently on the carpet on the floor of the boot. And I fitted a 13-amp mains socket to the inside of my pull-down garage door. Every time I park the car inside the garage I connect the charging lead that's attached to the CTEK to the flying lead that sits in the boot (from the battery), and connect the CTEK mains lead to the mains plug on the inside of the garage door. Then I carefully drape the charging lead from the CTEK unit over the lip of the boot such that the CTEK hangs down a little below the rear bumper, then close the boot lid so trapping said lead under the boot lid seal. Finally I check that there are at least a couple of appropriate charging lights shining on the CTEK unit (as a check that everything's connected up OK), and close the garage door. When I want to drive the car out of the garage, I obviously just reverse the procedure. And I have been doing this since the summer of 2012, and so far the battery has remained fully OK, and so have all the little electronic brains in the car, and also the boot lid seal.
My further point is, for anyone worrying whether it is safe to leave a CTEK conditioner unit connected for long periods, that whereas one would never have left an old-fashioned (i.e. 1970's style) Halfords-type battery trickle charger hooked up to the car battery for a long time, since it would have seriously overheated, clearly the CTEK is different and doesn't. As I sometimes say to friends who have brand new EVs, I have had a plug-in Jaguar for years now.