I think whether you award Xp or not depends on the situation. (And the DM's definition of "Challenge" and "Defeat/Overcome")
Lets say the party is in a dungeon, and fights some Imps. The wizard casts wall of force to cut off half of the imps from getting to the party. However, the Imps teleport (or whatever) away. The party probably shouldn't get Xp for fighting the Imps, especially if the Imps didn't get to "affect" the party much. (But if they did, the party should get "some" xp)
If the same Imps later return for revenge, (possibly with powerful magic items or minions) and the party defeats them, then they should get full Xp, unless the PCs have become so powerful since they fought the first imps that the returning Imps are not a challenge.
Now, lets say the same party confronts the Evil Cleric that plane-shifted the Imps to the material plane. Lets say the party attacks the cleric and kills him. If later the cleric is resurrected by a fellow cleric and attacks the party, the Party should get full XP both times. It is a different challenge. (The first time the cleric may have had little knowledge of how to fight the party, and the second time the cleric might also be a level lower due to being resurrected)