I have this xml:
<temas>
<tema>
<titulo>Odio como a un burgués la fuga de las sábanas.</titulo>
<nav>
<menu>
<menu-item>One</menu-item>
<menu-item>Two </menu-item>
<menu-item>Three</menu-item>
</menu>
</nav>
<content>
<span>hi</span>
<span>hi</span>
</content>
<pie>
<prev>something</prev>
</pie>
</tema>
</temas>
To which I have applied this XSL transformation:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="content">
<xsl:copy-of select="./*" />
</xsl:template>
<xsl:template match="span" priority="10000">
Why I don't show up?!
</xsl:template>
</xsl:stylesheet>
In my limited knowledge of XSLT, I would have expected that the last template would replace the span
nodes, but that doesn't happen. I hoped that the identity transform would copy everything and apply all the templates that matched, but it fails to apply that last template. I tried to change the priority to no avail.
Can you explain how XSL works in this cases when applying multiple templates?