I never developed a conersión function for hex numbers. This is an example of a function that is reverse to the example of Dimitre. I think it would be possible to further reduce the stylesheet. It is also worth noting that the conversion function can be parameterized and generalized to any base.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="offset" match="Offset/Value" use="../Name" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Offsets|Offset" />
<xsl:template match="Code/text()[../../Offset]" >
<xsl:variable name="code">
<xsl:call-template name="hex2dec">
<xsl:with-param name="num" select="." />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="offset">
<xsl:call-template name="hex2dec">
<xsl:with-param name="num" select="key('offset',../../Offset)" />
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="dec2hex">
<xsl:with-param name="dec" select="$code + $offset" />
</xsl:call-template>
</xsl:template>
<xsl:template name="hex2dec">
<xsl:param name="num" />
<xsl:param name="hex" select="translate($num,'abcdef','ABCDEF')"/>
<xsl:param name="acc" select="0" />
<xsl:choose>
<xsl:when test="string-length($hex)">
<xsl:call-template name="hex2dec">
<xsl:with-param name="hex" select="substring($hex,2,string-length($hex))" />
<xsl:with-param name="acc" select="$acc * 16 + string-length(substring-before('0123456789ABCDEF',substring($hex,1,1)))" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$acc" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dec2hex">
<xsl:param name="dec" />
<xsl:if test="$dec >= 16">
<xsl:call-template name="dec2hex">
<xsl:with-param name="dec" select="floor($dec div 16)" />
</xsl:call-template>
</xsl:if>
<xsl:value-of select="substring('0123456789ABCDEF', ($dec mod 16) + 1, 1)" />
</xsl:template>
</xsl:stylesheet>
Edit: Recently I just realized here is cross references. Therefore keys should be used.