I need to copy from input document to output document all attributes but one.
My input is like this:
Shortest form:
<xsl:template match="mylink">
<a><xsl:copy-of select="@*[name()!='type']"/></a>
</xsl:template>
Longer one (that's the first thing I came up with, I leave it for reference):
<xsl:template match="mylink">
<a>
<xsl:for-each select="@*">
<xsl:if test="name() != 'type'">
<xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
</xsl:if>
</xsl:for-each>
</a>
</xsl:template>
In XSLT 2.0:
<xsl:template match="mylink">
<a><xsl:copy-of select="@* except @type"/></a>
</xsl:template>