To write an identity transform, the best way is to have a stylesheet containing the single template rule:
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
This walks the tree copying every node as it goes. You can then add extra template rules to define customized behaviour for nodes that you want to modify.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference