Dawnguard introduces a few restoration spells which do sun damage.
Consider the following: according to the UESP wiki, Vampire's Bane grants 36 XP: Vampire's Bane is described as such:
Sunlight explosion that does 40 points of damage in a 15 foot radius to undead
However, this spell can do up to 50 damage with the Necromage perk, and 500 damage if it hits 10 enemies. It can also deal only 10 damage, if one is playing on the legendary difficulty. Does damage dealt affect experience gain?
Are there any exceptions?
One exception is Stendarr's Aura, which, due to a bug, grants destruction XP instead. What about the other spells?