XSLT mapping:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl=http://www.w3.org/1999/XSL/Transform>
<xsl:strip-space elements="*"/>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="root/invoice-header">
<xsl:copy>
<xsl:apply-templates select="node() except (approvals)"/>
<approvals>
<xsl:apply-templates select="approvals/approval">
<xsl:sort select="id" order= "descending"/>
</xsl:apply-templates>
</approvals>
</xsl:copy>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
No comments:
Post a Comment