I think that his basic argument is correct, that there was indeed a causal chain of events starting with the Madrid bombing and ending with the election of the Socialist party. That outcome may even have been, in the terrorists' minds, a desirable one (as the evidence that Dan brings forth certainly supports). Of course, we can extend the causal chain backwards ad infinitum, to whit: invading Iraq caused the Socialists to win! But thats a silly game. A more useful one is to follow the causal chain forwards:
Madrid bomb -> Spanish people reject terror in 2-million strong march of solidarity and will -> Aznar government actively tries to politicize the event, blaming ETA:
The PP knew that their antiterrorist policy (against ETA) was one of its main winning cards, and they didn't hesitate to blatantly manipulate the 11-M attack, suppressing information, calling people to demonstrate against ETA, knowing all the while that the Antiterrorist Information Brigade had as good as discarded ETA authorship a few hours after the attack. The antiterrorist police heads even threatened to resign at the madness of it all, and this was leaked to the opposition and the press.
And all the while the state TVE showing documentaries about ETA activities right until late Saturday night, on the eve of the election, and failing to report live on Minister Acebes informing about the Al-Q line of investigation which he had been forced to acknowledge � forced by his own angered police heads and by the media which had all the information but was withholding it just long enough for the Minister to do the decent thing. This heartless manipulation of the dead for political gain clinched it.
... -> Spanish electorate responds angrily by punishing Aznar for taking terrorism less seriously than domestic political opportunism.
By this chain of events, the critical link is the reaction to the bombing by the Aznar government, in shaling the electorate's mood. The victory for the terrorists was not the outcome of the vote, but the cynical reaction to it by the then-present government.