In XSLT 2.0
xsl:sort select="number((@priority, 2.5)[1])"
In 1.0 conditional expressions are more difficult, but you can use the substring() trick:
substring("2", 1, boolean(@priority)) is "2" if @priority exists, "" otherwise, so your sort key is
select="concat(@priority, substring('2.5', 1, boolean(@priority)*3))"
data-type="number"
Michael Kay
http://www.saxonica.com/