I want to move the element id to Here My Input xml is
<COLLECTION>
<abc>
<id>1234</id>
</abc>
<AddedParts NAME="AddedParts" TYPE="Unknown" STATUS="0">
<Part>
</Part>
<Here>
</Here>
</AddedParts>
</COLLECTION>
Expected output is
<COLLECTION>
<abc>
</abc>
<AddedParts NAME="AddedParts" TYPE="Unknown" STATUS="0">
<Part>
</Part>
<Here>
<id>1234</id>
</Here>
</AddedParts>
</COLLECTION>
The xsl i write is
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method= "xml" version= "1.0" encoding= "UTF-8" indent= "yes" />
<xsl:strip-space elements= "*" />
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match= "Here" >
<xsl:copy>
<xsl:apply-templates select= "node()|@*" />
<!-- move nodes to here -->
<xsl:apply-templates select= "../id " mode= "move" />
</xsl:copy>
</xsl:template >
< xsl:template match= "id" />
I am unable to achieve the expected output