title: How to group / sort records by value of some inner attribute?
body: <p>I wonder if there's way (actually I tried to find myself but hasn't been successful at all) how to re-sort XML report of records according to some group chracteristics. Let's say I have log file consisting of records in form of</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;log&gt;
    &lt;record id="12345"&gt;
      &lt;author&gt;me&lt;/author&gt;
      &lt;ts&gt;2014-05-02T13:03:50.528995Z&lt;/ts&gt;
      &lt;data&gt;arbitrary data&lt;/data&gt;
    &lt;/record&gt;
    &lt;record id="23456"&gt;
      &lt;author&gt;someone else&lt;/author&gt;
      &lt;ts&gt;2014-05-05T08:24:32.123495Z&lt;/ts&gt;
      &lt;data&gt;another arbitrary data&lt;/data&gt;
    &lt;/record&gt;
    …
  &lt;/log&gt;
  </code></pre>
  
  <p>What I want is to group records by author in a report: author's name and below ordered list of particular records. I don't know in advance who authors are, so I need to create list of their names dynamically.</p>
  
  <p>Is XSLT capable of solving of this?</p>