title: XSLT Custom Sort
body: <p>Is it possible in XSLT to sort in alphabetical order, with 5 items as "preferred".</p>
  
  <p>i.e. given</p>
  
  <pre><code>&lt;teams&gt;
  &lt;team id="142" name="Scotland" /&gt;
  &lt;team id="110" name="Liverpool" /&gt;
  &lt;team id="13" name="Manchester United" /&gt;
  &lt;team id="123" name="England" /&gt;
  &lt;team id="84" name="Chelsea" /&gt;
  &lt;team id="295" name="Wales" /&gt;
  &lt;team id="49" name="Arsenal" /&gt;
  &lt;team id="126" name="Northern Ireland" /&gt;
  &lt;team id="121" name="Republic of Ireland" /&gt;
  &lt;team id="42" name="Manchester City" /&gt;
  &lt;team id="298" name="Tottenham Hotspur" /&gt;
  &lt;team id="299" name="Bolton" /&gt;
  &lt;/teams&gt;
  </code></pre>
  
  <p>I require the national teams to be sorted first in a certain order, followed by the rest in alphabetical order:</p>
  
  <pre><code>&lt;teams&gt;
  &lt;team id="123" name="England" /&gt;
  &lt;team id="126" name="Northern Ireland" /&gt;
  &lt;team id="121" name="Republic of Ireland" /&gt;
  &lt;team id="142" name="Scotland" /&gt;
  &lt;team id="295" name="Wales" /&gt;
  &lt;team id="49" name="Arsenal" /&gt;
  &lt;team id="299" name="Bolton" /&gt;
  &lt;team id="84" name="Chelsea" /&gt;
  &lt;team id="110" name="Liverpool" /&gt;
  &lt;team id="42" name="Manchester City" /&gt;
  &lt;team id="13" name="Manchester United" /&gt;
  &lt;team id="298" name="Tottenham Hotspur" /&gt;
  &lt;/teams&gt;
  </code></pre>
  
  <p>I have been trying, but failing.  </p>
  
  <p>Is there a neat way to do this, or do you have to sort the national teams individually, followed by a sort which excludes all the national teams?</p>