If you are not able to use XSLT 2.0, it is still possible using XSLT 1.0. One way could be be recursively calling a named template:
<xsl:template match="number">
<xsl:call-template name="sumdigits">
<xsl:with-param name="number" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="sumdigits">
<xsl:param name="number" />
<xsl:param name="runningtotal">0</xsl:param>
<xsl:choose>
<xsl:when test="string-length($number) = 0">
<xsl:value-of select="$runningtotal" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="lastdigit" select="substring($number, string-length($number), 1)" />
<xsl:variable name="newrunningtotal" select="number($runningtotal) + number($lastdigit)" />
<xsl:call-template name="sumdigits">
<xsl:with-param name="number" select="substring($number, 1, string-length($number) - 2)" />
<xsl:with-param name="runningtotal" select="$newrunningtotal" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
It works by getting the last digit in the input, adds it on to a 'running total' and recursively calling the named template with the last two digits of the input removed. When there are no digits left, the running total can be returned.
This XSLT fragment assumes the input is in the XML within the element named 'number'
<number>123456789</number>
The result should be 25. As you can see, doing it in XSLT2.0 would be much nicer.