title: writing xslt for the below scenario
body: <p>INPUT xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;TABLE&gt;
  &lt;THEAD&gt;
      &lt;ROW id="rh"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;A&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;B&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;C&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;D&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;F&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
  
  &lt;/THEAD&gt;
  &lt;TBODY editable="T"&gt;
      &lt;ROW id="r1"&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;11&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;12&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;13&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;14&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;15&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
      &lt;ROW id="r2"&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;23&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;24&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
      &lt;ROW id="r3"&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;33&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;34&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="2" &gt;
              &lt;Para &gt;&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
      &lt;ROW id="r4"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;41&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;42&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;43&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;44&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="1" &gt;
              &lt;Para &gt;45&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  &lt;/TBODY&gt;
  &lt;/TABLE&gt;
  </code></pre>
  
  <p>Rule:
  for merged rows: copy content of primary merged cell to other cells in merged rows.
  Expected result:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;TABLE&gt;
  &lt;THEAD&gt;
      &lt;ROW id="rh"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;A&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;B&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;C&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;D&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;F&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
  
  &lt;/THEAD&gt;
  &lt;TBODY editable="T"&gt;
      &lt;ROW id="r1"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;11&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;12&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;13&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;14&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan=1" &gt;
              &lt;Para &gt;15&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
      &lt;ROW id="r2"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;11&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;12&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;23&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;24&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;15&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
      &lt;ROW id="r3"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;11&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;12&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;33&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;34&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;15&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  
      &lt;ROW id="r4"&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;41&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;42&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;43&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="F"  rowspan="1" &gt;
              &lt;Para &gt;44&lt;/Para&gt;
          &lt;/CELL&gt;
          &lt;CELL rowmerged="T"  rowspan="1" &gt;
              &lt;Para &gt;45&lt;/Para&gt;
          &lt;/CELL&gt;
      &lt;/ROW&gt;
  &lt;/TBODY&gt;
  &lt;/TABLE&gt;
  </code></pre>
  
  <p>Rule:
  for merged rows: copy content of primary merged cell to other cells in merged rows.
  Could you please help me out in this scenario.
  I am new to xslt.</p>
  
  <p>Thanks in advance.</p>