title: Split XML into multiple HTML files using XSLT
body: <p>I'm looking for a way to split an XML file into multiple HTML files which in the end, should contain a table.</p>
  
  <p>An example xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  
  &lt;table&gt;
    &lt;row&gt;
      &lt;name&gt;user1&lt;/name&gt;
      &lt;email&gt;email1&lt;/email&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;name&gt;user2&lt;/name&gt;
      &lt;email&gt;email2&lt;/email&gt;
    &lt;/row&gt;
    &lt;row&gt;
     &lt;name&gt;user3&lt;/name&gt;
     &lt;email&gt;email3&lt;/email&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;name&gt;user4&lt;/name&gt;
      &lt;email&gt;email4&lt;/email&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;name&gt;user5&lt;/name&gt;
      &lt;email&gt;email5&lt;/email&gt;
    &lt;/row&gt;
  
    ...
  
  &lt;/table&gt;
  </code></pre>
  
  <p>Now I want to split this xml file into different HTML files which contain a specific range from the XML file. Each HTML file should contain 3 rows from the XML for example.</p>
  
  <p><strong>table1.html</strong></p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;user1&lt;/td&gt;
      &lt;td&gt;email1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;user2&lt;/td&gt;
      &lt;td&gt;email2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;user3&lt;/td&gt;
      &lt;td&gt;email3&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>table2.html</strong></p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;user4&lt;/td&gt;
      &lt;td&gt;email4&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;user5&lt;/td&gt;
      &lt;td&gt;email5&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;user6&lt;/td&gt;
      &lt;td&gt;email6&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Anyone an idea how the XSLT file needs to be formatted? I'm using <a href="https://github.com/glejeune/ruby-xslt" rel="nofollow">ruby-xslt</a> to load the XML and XSLT file and convert the whole thing to HTML.</p>