You would make it much easier on us if you showed a small but complete XML input sample, an XSLT sample, the output you get and the output you want.
If you use xsl:output method="text"
and want to control the white space then make sure you use xsl:text
to output literal text and xsl:value-of
to output computed text. That way you should be able to control the white space exactly.