9.1 Set for W3
<xsl:template match="*[ not(child::*) ]" >
<xsl:copy>
<xsl:apply-templates select="@*|comment()|text()" />
<xsl:if test=" normalize-space(.) = ’’ " >
<xsl:comment><.comment.></xsl:comment>
</xsl:if>
</xsl:copy>
</xsl:template> -_-_-
Note: Java 5 complains when comments contain just white spaced.