If there is unwanted whitespace in your output then it comes from one of three places:
(a) it is copied from the source document
(b) it is generated by the stylesheet
(c) it is generated by the serializer because you specify indent="yes".
To get rid of it, you first need to find out which of these three cases applies.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference