XSLT
How to sort XSL output in order of custom string list or arbitrary strings
Rob — November 5, 2010 - 10:00
Have you ever wanted to sort the output of XSL using a custom string list or arbitrary text? Well, I came across such a situation with one of my clients where the order of nodes in an XML feed did not match the order that my client wanted. The answer is to use XPATH to test if the iterator is at the node you want (testing for a true or false), then use that boolean value and multiply by the intended position. Let's demonstrate this with an example.
The following is an example XML feed that we can use to demonstrate XSL arbitrary text sorting in action.
