title: XSLT - Strings and numbers ascending order, Saxon processor
body: <p>I'm try to understand how saxon processor selecting ascending order.</p>
  
  <p>I have xml like follows,</p>
  
  <pre><code>&lt;catalog&gt;
      &lt;cd&gt;
          &lt;title lan="en"&gt;Empire Burlesque&lt;/title&gt;
          &lt;price&gt;10.90&lt;/price&gt;
          &lt;year&gt;1985&lt;/year&gt;
      &lt;/cd&gt;
      &lt;cd&gt;
          &lt;title lan="en"&gt;Hide your heart&lt;/title&gt;
          &lt;price&gt; &lt;/price&gt;
          &lt;year&gt;1988&lt;/year&gt;
      &lt;/cd&gt;
      &lt;cd&gt;
          &lt;title lan="fr"&gt;Greatest Hits&lt;/title&gt;
          &lt;price&gt;13.90&lt;/price&gt;
          &lt;year&gt;1982&lt;/year&gt;
      &lt;/cd&gt;
      &lt;cd&gt;
          &lt;title lan="sp"&gt;Still got the blues&lt;/title&gt;
          &lt;price&gt;abc&lt;/price&gt;
          &lt;year&gt;1990&lt;/year&gt;
      &lt;/cd&gt;
      &lt;cd&gt;
          &lt;title lan="fr"&gt;Eros&lt;/title&gt;
          &lt;price&gt;24.90&lt;/price&gt;
          &lt;year&gt;1997&lt;/year&gt;
      &lt;/cd&gt;
  &lt;/catalog&gt;
  </code></pre>
  
  <p>when I sort this by price I it give me following results. note that I put empty string to one price value and string <code>'abc'</code> no another price value.</p>
  
  <pre><code>&lt;catalog&gt;
         &lt;cd&gt;
              &lt;title lan="en"&gt;Hide your heart&lt;/title&gt;
              &lt;price&gt; &lt;/price&gt;
              &lt;year&gt;1988&lt;/year&gt;
          &lt;/cd&gt;        
          &lt;cd&gt;
              &lt;title lan="en"&gt;Empire Burlesque&lt;/title&gt;
              &lt;price&gt;10.90&lt;/price&gt;
              &lt;year&gt;1985&lt;/year&gt;
          &lt;/cd&gt;
  
          &lt;cd&gt;
              &lt;title lan="fr"&gt;Greatest Hits&lt;/title&gt;
              &lt;price&gt;13.90&lt;/price&gt;
              &lt;year&gt;1982&lt;/year&gt;
          &lt;/cd&gt;
  
          &lt;cd&gt;
              &lt;title lan="fr"&gt;Eros&lt;/title&gt;
              &lt;price&gt;24.90&lt;/price&gt;
              &lt;year&gt;1997&lt;/year&gt;
          &lt;/cd&gt;
          &lt;cd&gt;
              &lt;title lan="sp"&gt;Still got the blues&lt;/title&gt;
              &lt;price&gt;abc&lt;/price&gt;
              &lt;year&gt;1990&lt;/year&gt;
          &lt;/cd&gt;    
  &lt;/catalog&gt;
  </code></pre>
  
  <p>It seems empty string has comes first, then price has numbers, have sorted as expected and price has string value, has comes first,</p>
  
  <p>How this order decides by Saxon processor?? </p>