Is it possible to do, and how would one achieve, natural case sorting in XSL?
For instance, given the following XML snippet:
<items>
<item>A 24</item>
<item>B 12</item>
<item>B 11</item>
<item>C 10</item>
<item>A 1</item>
<item>B 2</item>
</item>
How could I sort the output so that I had a list of elements as below?
<ul>
<li>A 1</li>
<li>A 24</li>
<li>B 2</li>
<li>B 11</li>
<li>B 12</li>
<li>C 10</li>
</ul>
Edit: I'm particularly interested in solutions that can work with arbitrary strings, eg. ones that don't follow a common pattern, similar to the way PHP's natsort works.