The simplest solution
Simply remove data-type="number"
.
Your example will sort just fine as text (which is the default). In general, simply sorting as text is probably the best approach. XSLT 1.0 does not handle arbitrary data transformations very well, and if you try to use it as a "general" string processor, you'll end up with large, complex, hard to maintain transformations.
If you do sort as text, you'll need to ensure all numbers are padded with 0's on the left to the same length. All letters must be in the same case (which is almost always true anyhow, but might break if you combine data from different sources.) Usually, these requirements are easy to meet outside of XSLT.
A slightly more general and longer solution
The xslt-function translate(my-xpath-expr,'abcdef','ABCDEF')
could be used to transform mixed-case hexadecimals into upper-case hexadecimals. This probably isn't necessary, usually.
If you don't know the length of the hexadecimal number you can prepend '0' as dimitre's solution shows, but you can often get away with a simpler trick:
<xsl:sort select="string-length(Generation/Sirio/Code)" data-type="number"/>
<xsl:sort select="translate(Generation/Sirio/Code,'abcdef','ABCDEF')"/>
This works so long as smaller numbers are never longer than larger numbers. It also works if the numbers may contain spaces or are prefixed by "0x
".
However, if possible, you're best off simply ensuring all numbers are formatted identically and sorting by text - KISS where possible.