This transformation:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()[starts-with(.,' ')]">
<xsl:value-of select=
"concat(' ', 'def', substring(.,2))"/>
</xsl:template>
</xsl:stylesheet>
when applied on the provided XML document:
<AAA>
<CCC> abc</CCC>
</AAA>
produces the wanted, correct result:
<AAA>
<CCC> defabc</CCC>
</AAA>