If you use XSLT 2.0 then simply sort into a variable e.g.
Code:
<xsl:variable name="sortedCountries">
<xsl:for-each select="countries/country">
<xsl:sort select="name"/>
<xsl:copy-of select="."/>
</xsl:variable>
then process the sorted elements in the variable and following-sibling should give you the following sibling in sort oder.
If you are using XSLT 1.0 then you can also sort into a variable but you need to use an extension function like exsl:node-set first on the variable before you can use XPath like following-sibling on that.