When you do static stretching to increase flexibility, the aim is to relax the muscles as much as possible. The lower the pressure in your abdomen, the more relaxed your muscles will be. Therefore you should breathe shallowly, and you can do some deep exhalations, releasing all your air in a sort of sigh.I'm not so sure about dynamic stretchinbg, but exhaling on the stretch sounds about right.

_________________________
The world's a will to power and nothing besides

Yup you are correct exhaling on a stretch is the best methods. For example when you are standing up right and going to bend down to touch your toes you are supposed to breath in when you lift your arms up and once you start going down you exhale as it helps to relax you into the stretch.Just image how awkward it would feel doing it the other way around.

As for breathing on Dynamic Stretching, I beleive you are supposed to exhale as the limb etc is being stretched. For instance in the case of a leg swing a breath should be taken before you start and then exhaled as the leg is swung upwards, inhaling again as the leg comes down back to start. Just like when most strikes or techniques are performed.

I agree with what has been said on Dynamic stretches. Exhaling as you stretch is a good idea and very similar to a kiai. When it comes to static stretching, the best thing to do is just to breathe naturally. You can't be relaxed if you're trying to change the way you breathe. Just relax into the stretch and keep breathing and it'll be fine.