<xsl:for-each select="explode_code">
<xsl:variable name="sortedElements">
<xsl:for-each select="descendant-or-self::manufacturing_part">
In your sample data, the explode_code element does not have any descendant-or-self manufacturing_part elements, so there isn't going to be any data to sort.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference