You haven't shown enough of the code for me to see what the context item is. The fact that you didn't show this suggests that you haven't understood the importance of getting the context right, because this is the most likely cause of this kind of error. The relationship of your two xsl:for-each expressions also suggests confusion about context:
<xsl:for-each select="range[@ag_class='ManufacturerParts']">
<xsl:element name="ManufacturerParts"></xsl:element>
<xsl:element name="ManufacturerPartsComposition">
<xsl:for-each select="range[@ag_class='BOS_ROHS']">
If the outer for-each selects anything, it will select a range element, and the inner for-each will then try to select children of this range element; but in your source document a range element never has any children called range.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference