I am using XML to store a small contact list and trying to write a XSL template that will transform it into a CSV file. The problem I am having is with whitespace in the out
As far as removing tabs but retaining separate lines, I tried the following XSLT 1.0 approach, and it works rather well. Your use of version 1.0 or 2.0 largely depends on which platform you're using. It looks like .NET technology is still dependant on XSLT 1.0, and so you're limited to extremely messy templates (see below). If you're using Java or something else, please refer to the much cleaner XSLT 2.0 approach listed towards the very bottom.
These examples are meant to be extended by you to meet your specific needs. I'm using tabs here as an example, but this should be generic enough to be extensible.
XML:
adslfjksdaf
dsalkfjdsaflkj
lkasdfjlsdkfaj
...and the XSLT 1.0 template (required if you use .NET):
XSLT 2.0 makes this trivial with the replace
function: