The only really good way to do this in the XML would be something like:
(CastingUnitSpellMastery / TargetUnitSpellResistance) * SpellDmg
This would amplify the power of the spell if the caster has a higher spell mastery than the target's spell resistance, and vice-versa.
Easy to mod.
However, since you can't use IF or > < statements in the XML calculates, there's not a good way that I've found, without some changes to the base code, to use a straight -x% formula for this kind of resistance as the game currently stands.
I know you're calling for a change, I'm just letting you know what's currently possible without too much code work.