I can't really follow the logic of your code - it seems to handle a single testsuite that contains a single testcase.
You can of course invert the code I gave you so that when processing an individual <something> you use an xsl:choose condition to decide whether it is before or after the insertion point and therefore whether to add 1 to the @uid attribute:
<xsl:template match="something">
<something>
<xsl:attribute name="uid">
<xsl:choose>
<xsl:when test="@uid >= $param">
<xsl:value-of select="@uid"/>
</
<xsl:otherwise>
<xsl:value-of select="@uid+1"/>
</
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference