title: Need to insert node while processing html through XSLT
body: <p>I am converting html to xml using XSLT 1.0. Here is my input</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr id=1&gt;
     &lt;td rowspan=2&gt;
     &lt;td&gt;
  &lt;/tr&gt;
  &lt;tr id=2&gt;
     &lt;td&gt;   
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>This is normal rowspan code in html.
  If I am having attribute rowspan in td(id=1),I have to create a new element td in front of already existing td in tr(id=2).The number of new element td in consecutive tr depends on rowspan value.</p>
  
  <p>How to do it in xsl template (or) any post process after xslt conversion ..please help me..Thanks in advance..</p>
  
  <p>I will make it more clear..</p>
  
  <p>The table is 3 *3. consider the first column in each row is merged.so my input html looks like this</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr id="1"&gt;
      &lt;td  rowspan="3"&gt;
           &lt;/p&gt;
      &lt;/td&gt;
     &lt;td&gt;
        &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
        &lt;/p&gt;
     &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr id="2"&gt;
      &lt;td&gt;
           &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
           &lt;/p&gt;
     &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr id="3"&gt;
     &lt;td&gt; 
           &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
           &lt;/p&gt;
     &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The  tr with id=2 &amp; 3 has two td,means that the first column is merged with first tr-->td which has rowspan value as 3(that is 3 row including the current row cell is merged). my result should be</p>
  
  <pre><code>&lt;w:tbl&gt; &lt;!-- represents table --&gt;
  &lt;w:tr&gt; &lt;!-- represents table tr--&gt;
    &lt;w:tc&gt;   &lt;!-- represents table td--&gt;
       &lt;w:tcPr&gt;  &lt;!-- represents td style--&gt;
           &lt;w:vMerge w:val="restart"/&gt; &lt;!-- added due to having rowspan attribute--&gt;
        &lt;/w:tcPr&gt;
         &lt;w:p/&gt;
    &lt;/w:tc&gt;
    &lt;w:tc&gt;
         &lt;w:p/&gt;
    &lt;/w:tc&gt;
    &lt;w:tc&gt;
         &lt;w:p/&gt;
    &lt;/w:tc&gt;
  &lt;/w:tr&gt;
  &lt;w:tr&gt;
      &lt;w:tc&gt;  &lt;!-- have to add this node in addition--&gt;
            &lt;w:tcPr&gt;  
                &lt;w:vMerge/&gt;
            &lt;/w:tcPr&gt;           
            &lt;w:p/&gt;
      &lt;/w:tc&gt;
      &lt;w:tc&gt; 
           &lt;w:p/&gt;
      &lt;/w:tc&gt;
      &lt;w:tc&gt;
           &lt;w:p/&gt;
      &lt;/w:tc&gt;
  &lt;w:tr&gt;
  &lt;w:tr&gt;
      &lt;w:tc&gt;  &lt;!-- have to add this node in addition--&gt;
            &lt;w:tcPr&gt;  
                &lt;w:vMerge/&gt;
            &lt;/w:tcPr&gt;           
            &lt;w:p/&gt;
      &lt;/w:tc&gt;
      &lt;w:tc&gt;
            &lt;w:p/&gt;
       &lt;/w:tc&gt;
       &lt;w:tc&gt;
            &lt;w:p/&gt;
       &lt;/w:tc&gt;
  &lt;w:tr&gt;
  &lt;/w:tbl&gt;
  </code></pre>