DR is used to reduce the damage from physical attacks.
If the physical damage you are taking is the direct result of a spell, DR does not apply.


Other effects of the spells damage type will be applied however.
For example an ooze will still split if it is hit by the slashing damage of a blade barrier.



(Outside of DDO, spell resistance is used to stop physical spells, like a bladebarrier)