Well in the first example the default templates cause the document root to be matched and processed which recursively calls apply-templates on all children and outputs text as it goes along. You can add the empty template
Code:
<xsl:template match="*"/>
if you want to supress unawanted output.
Another good way if to step through the transform in an XSLT debugger if you have one, XMLSpy has one, I think, as does VS.Net 2005.
--
Joe (Co-author Beginning XML, 3rd edition)