Although it may seem like it, dogs do not act out of spite, they don't understand the concept. If you react angrily when coming across an accident, they will only equate elimination with mad mom and be even more reluctant to do this in front of you. Confinement and reward and patience will get you a well trained dog in the end. There is a training method on my site that I adapted from info someone sent me a while ago and it has been very successful.
www.sylvanyorkies.com