title: XML parsing: How to separate same type siblings into different cells?
body: <p>XML file:</p>
  
  <pre><code>&lt;books&gt;
      &lt;scifi key=...&gt;
         &lt;author&gt;Don Larson&lt;/author&gt;
         &lt;title&gt;The Edge&lt;/title&gt;
         &lt;year&gt;...&lt;/year&gt;
      &lt;/scifi&gt;
      &lt;scifi key=...&gt;
         &lt;author&gt;Don Larson&lt;/author&gt;
         &lt;author&gt;James Kiddleton&lt;/author&gt;
         &lt;author&gt;Danny Wobers&lt;/author&gt;
         &lt;title&gt;Incognitum&lt;/title&gt;
         &lt;year&gt;1987&lt;/year&gt;
      &lt;/scifi&gt;
      &lt;scifi key=...&gt;
         &lt;author&gt;....&lt;/author&gt;
         &lt;author&gt;....&lt;/author&gt;
         &lt;title&gt;...&lt;/title&gt;
         &lt;year&gt;...&lt;/year&gt;
      &lt;/scifi&gt;
      etc......................
  &lt;/books&gt;
  </code></pre>
  
  <p>XSL file:</p>
  
  <pre><code>&lt;xsl:template match="/"&gt;
    &lt;html&gt;
    &lt;body&gt;
      &lt;center&gt;&lt;h1&gt;SciFi&lt;/h1&gt;
      &lt;table border="1"&gt;
      &lt;tr&gt;
        &lt;th&gt;Title&lt;/th&gt;
        &lt;th&gt;Authors&lt;/th&gt;
        &lt;th&gt;Year&lt;/th&gt;
      &lt;/tr&gt;
        &lt;xsl:for-each select="books/scifi"&gt;
        &lt;xsl:sort select="year"/&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;center&gt;&lt;xsl:value-of select="title"/&gt;&lt;/center&gt;&lt;/td&gt;
        &lt;td&gt;
         &lt;xsl:for-each select="author"&gt;
          &lt;p&gt;&lt;xsl:value-of select="."/&gt;&lt;/p&gt;
          &lt;/xsl:for-each&gt;
        &lt;/td&gt; 
        &lt;td&gt;&lt;xsl:value-of select="year"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/xsl:for-each&gt;
      &lt;/table&gt;
      &lt;/center&gt;
    &lt;/body&gt;
    &lt;/html&gt;
  &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt; 
  </code></pre>
  
  <p>When the above table is displayed, for each cell containing a title, the cell next to it contains all the authors related to that title</p>
  
  <p>eg:</p>
  
  <pre><code>    Title         Authors        Year
     (1cell)        (1cell)       (1cell)
      -----         -------        ----
                   Don Larson
   Incognitum   James Kiddleton    1987
                  Danny Wobers
  </code></pre>
  
  <p>Now what I want to do is for each title display the authors (if there is more than one that is..) related to it in separate cells and get something like this instead:</p>
  
  <pre><code>    Title         Authors        Year
     (3cells)        (3cells)    (3cells)
      -----         -------        ----
   Incognitum      Don Larson      1987
   Incognitum   James Kiddleton    1987
   Incognitum     Danny Wobers     1987
  </code></pre>
  
  <p>Instead of having one cell for title and one cell containing all three authors related to that title, I want to have three cells with the same title and each of those cells can have a cell with the related author next to it.</p>
  
  <p>I still want to keep sorting everything by yeat and I still want the order of my cells (left->right) to be Title->Author->Year</p>
  
  <p>What do I have to change in my XSL file?</p>