The best way of tackling this kind of problem is to write a template rule that copies every element:
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
and then write further template rules for elements you want to treat differently, for example
<xsl:template match="x"/>
deletes any subtree rooted at an x element, while
<xsl:template match="y">
<xsl:apply-templates/>
</xsl:template>
processes the children of the y element but drops the y element itself.
If that doesn't help, you'll have to explain your problem more specifically.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference