Here\'s my XML:
-
T 1
If you don't strip and don't indent, but transform white space text nodes to a line break, as in
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="comment()"/>
<xsl:template match="@class" />
<xsl:template match="node()[not(self::doc|self::texte|self::author|self::style|self::span)]|@*" >
<xsl:copy>
<xsl:apply-templates select="node()[not(self::author)]|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()[not(normalize-space())]">
<xsl:text> </xsl:text>
</xsl:template>
</xsl:stylesheet>
then the result is hopefully what you want.