The attributes of xsl:sort that are defined as attribute
value templates (order, case-order, lang) are evaluated
with the wrong node as context node. This means that if
the expression used in the AVT is context-sensitive, the
sort may fail or may output the results in the wrong
This affects Saxon 7.1 only.
Reported by Trond Aasan [email@example.com]
Source code fixed. Test case added (sort19).