Well, if you define a variable, like so...
<xsl:variable name="replace" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
Then you could simplify the 'translation' of one letter, like so
<xsl:value-of select="string-length(substring-before($replace, $letter)) + 1" />
And to do it on a whole string, you would use a recursive template, where you replaced one letter at a time.
Try this XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="replace" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:template match="word" >
<xsl:copy>
<xsl:call-template name="translate">
<xsl:with-param name="text" select="." />
</xsl:call-template>
</xsl:copy>
</xsl:template>
<xsl:template name="translate">
<xsl:param name="text" />
<xsl:if test="$text != ''">
<xsl:variable name="letter" select="substring($text, 1, 1)" />
<xsl:value-of select="string-length(substring-before($replace, $letter)) + 1" />
<xsl:call-template name="translate">
<xsl:with-param name="text" select="substring($text, 2, string-length($text) -1 )" />
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
When applied to this XML
<word>ABCDEFGHIJKLMNOPQRSTUVWXYZ</word>
The following is output
<word>1234567891011121314151617181920212223242526</word>