You can change substructure with identity and a few templates:
This changes the 'href' attribute to 'uri-ref' and changes the 'a' element to 'link'.
<xsl:template match="@href"> <xsl:attribute name="uri-ref"><xsl:value-of select='.'/></xsl:attribute> </xsl:template> <xsl:template match="a"> <link> <xsl:apply-templates select="@*|node()"/> </link> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template>
You can try this out yourself: small-changes.xsl (input) (output)