I have requirement to convert attribute to element but below xslt code is doing it but attribute of child element is within the child element tag along with value but I want attribute values immediately after the child element not within child element.
Xml:
<parent>
<child xml:lang="EN">Value</child>
</parent>
Xslt code:
<xsl:template match="child/@*">
<xsl:element name="{local-name()}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
After xslt:
<parent>
<child><lang>EN</lang>Value</child>
</parent>
But requirement is:
<parent>
<child>Value</child>
<lang>EN</lang>
</parent>