title: Matrix transposition in XSLT
body: <p>I'm trying to go from this kind of input:</p>
  
  <pre><code>&lt;col title="one"&gt;
      &lt;cell&gt;a&lt;/cell&gt; &lt;cell&gt;b&lt;/cell&gt; &lt;cell&gt;c&lt;/cell&gt; &lt;cell&gt;d&lt;/cell&gt;
  &lt;/col&gt;
  &lt;col title="two"&gt;
      &lt;cell&gt;e&lt;/cell&gt; &lt;cell&gt;f&lt;/cell&gt; &lt;cell&gt;g&lt;/cell&gt;
  &lt;/col&gt;
  </code></pre>
  
  <p>... to this HTML output with XSLT:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt; &lt;th&gt;one&lt;/th&gt; &lt;th&gt;two&lt;/th&gt; &lt;/tr&gt;
      &lt;tr&gt; &lt;td&gt;a&lt;/td&gt;   &lt;td&gt;e&lt;/td&gt;   &lt;/tr&gt;
      &lt;tr&gt; &lt;td&gt;b&lt;/td&gt;   &lt;td&gt;f&lt;/td&gt;   &lt;/tr&gt;
      &lt;tr&gt; &lt;td&gt;c&lt;/td&gt;   &lt;td&gt;g&lt;/td&gt;   &lt;/tr&gt;
      &lt;tr&gt; &lt;td&gt;d&lt;/td&gt;                &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>In other words I want to perform a matrix transposition. I couldn't find a simple way to do that, there probably isn't, I guess; how about a complicated one? While searching on Google I found hints that a way to solve this was through recursion. Any idea appreciated.</p>