Hi John and Ian,
I've just joined having recently bought an X-Type 2l TD. However, I'm not new to Jags: my father had several and I have previously owned an XJS plus a Daimler Sovereign when I was much younger, lol.
I have exactly the same issue: 2004 2L diesel. Problem is not constant but when it happens it 's like it goes into limp mode. As Frank stated, turning ignition on and off clears the problem.