You can use an identity template to copy the original XML and put a <sort>
element on the end. See next tutorial: http://www.xmlplease.com/xsltidentity
Here is an XSLT example:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="response">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
<sort>
<xsl:for-each select="case">
<field />
<ascending />
</xsl:for-each>
</sort>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>