Consider to post minimal but complete samples (.NET code to run the transformation, XML, XSLT, output you want, output you get) that allow us to reproduce and understand the problem. I am afraid so far your two sentence description is to vague to tell
what is going on exactly, I can only point you to
the whitespace section in the XSLT FAQ .
MVP Data Platform Development
My blog