I wanted to replace all matching nodes in the xml-file.
To the original xml:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel>
<Button/>
</StackPanel>
</Window>
I applied the following xslt:
<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="Button">
<AnotherButton><xsl:apply-templates select="@*|node()" /></AnotherButton>
</xsl:template>
</xsl:stylesheet>
But it produces the same xml. What I did wrong?