The item you have just matched is an attribute, and so has no child nodes! The parent node will have been matched by the identity template, and so to 'continue' editing, just have a template matching the class_id attribute you wish to match, but include a match on the relevant item in the xpath expression.
For example, to change the class_id of the pimpl element, add this template
<xsl:template match="item[@class_name = 'CLASS_E']/pimpl/@class_id">
<xsl:attribute name="class_id">4</xsl:attribute>
</xsl:template>
And to change the f element, add this template
<xsl:template match="item[@class_name = 'CLASS_E']/pimpl/f">
<c>
<xsl:apply-templates select="@*|node()"/>
</c>
</xsl:template>
Remember, the match applies to the input document, so it doesn't matter that in the output document you have changed 'CLASS_E' to 'CLASS_D'.
Note that you may have an issue with your current template that matches the class_name attribute. In this you are replacing it with two attributes, including the class_id attribute which already exists. XSLT will replace attribute in the output tree where one with the same name has already been output. This means if your XML actually looked like this...
<item class_name="CLASS_E" class_id="5" tracking_level="0" version="0">
Then it would be output would actually look this this
<item class_name="CLASS_D" class_id="5" tracking_level="0" version="0">
This is because the identity template will match the class_id attribute after your template that matches the class_name and so will replace the class_id attribute which the one it has currently matched.
But to cut a long story short, try this XSLT.....
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" encoding="UTF-8" indent="yes"/>
<!-- identity-->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="item/@class_name[. = 'CLASS_E']">
<xsl:attribute name="class_name">CLASS_D</xsl:attribute>
</xsl:template>
<xsl:template match="item[@class_name = 'CLASS_E']/@class_id">
<xsl:attribute name="class_id">2</xsl:attribute>
</xsl:template>
<xsl:template match="item[@class_name = 'CLASS_E']/pimpl/@class_id">
<xsl:attribute name="class_id">4</xsl:attribute>
</xsl:template>
<xsl:template match="item[@class_name = 'CLASS_E']/pimpl/f">
<c>
<xsl:apply-templates select="@*|node()"/>
</c>
</xsl:template>
</xsl:stylesheet>