title: create child nodes from sibling nodes until a different sibbling occurs
body: <p>Hi does anyone know what the xsl would look like to transform this XML. There can be N nte's after pid and N nte's after pv1. The structure is guaranteed in that all nte that follows pid belongs to pid and all nte following pv1 belongs to pv1.</p>
  
  <p>From:</p>
  
  <pre><code>&lt;pid&gt;
  &lt;/pid&gt;
  &lt;nte&gt; 
    &lt;nte-1&gt;1&lt;/nte-1&gt;
    &lt;nte-3&gt;Note 1&lt;/nte-1&gt;
  &lt;/nte&gt;
  &lt;nte&gt;&lt;/nte&gt;
  &lt;pv1&gt;&lt;/pv1&gt;
  &lt;nte&gt;
  &lt;/nte&gt;
  </code></pre>
  
  <p>into: </p>
  
  <pre><code>&lt;pid&gt;
    &lt;nte&gt; 
      &lt;nte-1&gt;1&lt;/nte-1&gt;
      &lt;nte-3&gt;Note 1&lt;/nte-1&gt;
    &lt;/nte&gt;
    &lt;nte&gt;
    &lt;/nte&gt;
  &lt;/pid&gt;
  &lt;pv1&gt;
    &lt;nte&gt;
    &lt;/nte&gt;
  &lt;/pv1&gt;
  </code></pre>
  
  <p>Thanks!</p>