The context is the war against terror. This is not a war on all terrorism everywhere--strictly those terrorist groups which operate on a worldwide basis against the US. We are not fighting the IRA or the Tamil Tigers or the Shining Path guerillas, which operate on a local, national basis."
There are some interesting implications to your statement. You state that the "war on terror" is directed solely against those who target the US. It is obviously not directed against those terrorists who attack states which have been declared enemy or "rogue" states by the US government. This is a fact which is not lost on many people outside the US. When Reagan declared the first "war on terrorism", the US-sponsored Contra terrorism in Nicaragua was in full swing.
Another curious distinction you make is that between "worldwide" and "local" terrorism. It is funny that you should mention the IRA. This terrorist organization has received a lot of funding from US citizens, and IRA terrorists have been known to travel to the US and parts of Europe. I guess that makes it transatlantic terrorism.
No legal or moral argument supports the conclusion, that a country only has the right to defend itself against "worldwide" terrorism, but not against "national" terrorism. There is no significant difference between US-sponsored Contra terrorism and Al Qaeda terrorism, except that one is in the interests of the US, and the other is clearly not.
Again - support of terrorism against everybody else and the declared intention to fight terrorism which is directed at oneself, does not make a good combination.
"My comment about training in the US, is that that would fit the analogy with Iraq; they have trained al Qaeda in Iraq. The Sandinistas seem to have been trained mostly in Honduras. If Nicaragua attacked Honduras to wipe out the training camps, that would be similar to a US attack on Iraq."
Analogies easily lead to wrong conclusions. I would rather that we talk about legal principles. If you support the principle, that every country has the right to attack another country which sponsors terrorism, then Nicaragua clearly had (maybe still has) the right to bomb the US. The US gave training and material support (including air reconnaissance) to the Contra terrorists. Some Contra leaders were trained at Fort Benning. The US has even been condemned by the world court for its actions. You will not find a more clear-cut example.