translate element name to element name
Hi,
How to translate:
<aName att1="1" att2="2" att3="3">
to
<differentName att1="1" att2="2" att3="3">
?
Currently I use something like this:
<xsl:template match="aName">
<xsl:element name="differentName">
<xsl:attribute name="att1">...</xsl:attribute>
<xsl:attribute name="att2">...</xsl:attribute>
<xsl:attribute name="att3">...</xsl:attribute>
<xsl:copy-of select='./*'/>
...
</xsl:element>
...
</xsl:template>
which I don't think is ugly and get locked with those explicit attribute definitions.
Any opinion?
|