White-space handling is tricky at the best of times in XSLT. In this case, it's not clear what you are actually trying to achieve, but maybe strip-space isn't what you need anyway.
I'd suggest that you check out this question on Stack Overflow. The answers by Dimitre Novachev and Michael Kay are both instructive (as are pretty much all the answers given by these two.)
Seeing as white-space in XSLT is known to be difficult, I'd suggest looking first in your XSLT for the problem, and only then in the mediator. It should be straight-forward enough to execute your transform in a suitable XSLT editor like Altova Xml Spy, and thereby exclude Tridion and the mediator from the problem domain.
Put briefly, in XSLT, an important distinction is whether the white space is in the source XML document, or in the XSLT itself.
More generally, I can't do better than to quote Dimitre in one of his comments:
"As for good XSLT learning sources, Michael Kay's books are the best.
They seem big, but just read them thoroughly and you'll get very good
grasp of the subject"