You probably just need to change:
Code:
<xsl:apply-templates select="file"/>
to
Code:
<xsl:apply-templates select="//file"/>
to select all the descendant or self file elements. Alternatively you can use the identity pattern, and simplify your matching template:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="file">
<fileinfo type="{type}" size="{size}"/>
</xsl:template>
</xsl:stylesheet>
--
Joe (
Microsoft MVP - XML)