title: Denormalize a document using XSLT
body: <p>I am new to XSLT so excuse me if this is a noob question.</p>
  
  <p>Let's say I have this XML document (one hotel element with 2 private_rates):</p>
  
  <pre><code>&lt;hotel&gt;
    &lt;private_rates&gt;
      &lt;private_rate&gt;
        &lt;id&gt;1&lt;/id&gt;
      &lt;/private_rate&gt;
      &lt;private_rate&gt;
        &lt;id&gt;2&lt;/id&gt;
      &lt;/private_rate&gt;
    &lt;/private_rates&gt;
  &lt;/hotel&gt;
  </code></pre>
  
  <p>Is there any way to use XSLT to transform it into 2 hotel elements, each with one private rate ?</p>
  
  <pre><code>&lt;hotel&gt;
    &lt;private_rates&gt;
      &lt;private_rate&gt;
        &lt;id&gt;1&lt;/id&gt;
      &lt;/private_rate&gt;
    &lt;/private_rates&gt;
  &lt;/hotel&gt;
  &lt;hotel&gt;
    &lt;private_rates&gt;
      &lt;private_rate&gt;
        &lt;id&gt;2&lt;/id&gt;
      &lt;/private_rate&gt;
    &lt;/private_rates&gt;
  &lt;/hotel&gt;
  </code></pre>
  
  <p>How would the XSLT for that look like? Any help will be greatly appreciated! thanks.</p>