Hello Isaac
Your approach won't work because the "select" bit of a sort is relative to
the context node being sorted - that's why your primary sort is
<xsl:sort select="@i54"/>
By handing it a variable instead you're just evaluating the same nodeset
every time, which won't do any sorting.
It looks like you want to do a second sort on @i25, where M & I come after
all the other letters. If so, you could turn the select expression into a
test that evaluated to either true or false, which would give a value to
sort on.
<xsl:sort select="(@i25 = 'M' or @i25 = 'I')" order="descending"/>
Then if you wanted, within the groups, to sort alphabetically, you just use
a third sort on @i25, etc.
Hope it works. Your xml looks fearsome,
Regards,
Tom SW
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list