Battery Light intermittantly comes on on 2005 Jaguar X-Type

2005 X-Type.
The battery light came on intermittantly. When the light was "on" the alternator was not charging. If I turned the car off and removed the key...when I restarted the car the light was off and the alternator was working. I drove like this for about a month til I could aford a new alternator and battery.
After replacing these the light stayed off for 2 weeks but came on again today. I switched the car off and removed the key. After the restart the light stayed off. Any ideas what I should look at next?

Asked by for the 2005 Jaguar X-Type
I would make sure all your grounds are clean and tight. Did you have the alternator checked prior to replacing it?
1 more answer
similar problem on my 2003 model. been there for over three years. sometimes happens once in three months. had my charging system checked 3 times when in jaguar dealer for a service. nothing found wrong. so i just switch off like you and carry on.