title: XSLT 1.0 sort elements
body: <p>I have the following XML document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;objects&gt;
      &lt;object&gt;Clutch&lt;/object&gt;
      &lt;object&gt;Gearbox&lt;/object&gt;
      &lt;object&gt;Cylinder head&lt;/object&gt;
      &lt;object&gt;Starter&lt;/object&gt;
      &lt;object&gt;Airbox&lt;/object&gt;
      &lt;object&gt;Inlet manifold&lt;/object&gt;
  &lt;/objects&gt;
  </code></pre>
  
  <p>And the following XSLT document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:output method="xml" indent="yes"/&gt;
  
      &lt;xsl:template match="objects"&gt;
          &lt;parts&gt;
              &lt;xsl:apply-templates&gt;
                  &lt;xsl:sort select="object"/&gt;
              &lt;/xsl:apply-templates&gt;
          &lt;/parts&gt;
      &lt;/xsl:template&gt;
  
      &lt;xsl:template match="object"&gt;
          &lt;part&gt;
              &lt;xsl:apply-templates/&gt;
          &lt;/part&gt;
      &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>When applied I am getting the following output as expected, but it is not being sorted:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;parts&gt;
      &lt;part&gt;Clutch&lt;/part&gt;
      &lt;part&gt;Gearbox&lt;/part&gt;
      &lt;part&gt;Cylinder head&lt;/part&gt;
      &lt;part&gt;Starter&lt;/part&gt;
      &lt;part&gt;Airbox&lt;/part&gt;
      &lt;part&gt;Inlet manifold&lt;/part&gt;
  &lt;/parts&gt;
  </code></pre>
  
  <p>Why is the <code>&lt;xsl:sort select="object"/&gt;</code> not being applied ?</p>