title: Copy node and add value to attribute with Xslt
body: <p>Basiccly i have problem with xml and xslt which i do not know how to solve, and would appreciate any help regarding this matter where to start. I have XML:</p>
  
  <pre><code>&lt;root&gt;
   &lt;test value="1" setting="3"&gt;
     &lt;tag1&gt;data....&lt;/tag1&gt;
     &lt;tag2&gt;data....&lt;/tag2&gt;
     &lt;tag n+1&gt;data....&lt;/tag n+1&gt;
   &lt;/test&gt;
   &lt;test value ...
   .
   .
   .
   &lt;/test&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Now i would now need to copy, all nodes in "test" node in this way and add always value 3 to settings value (settings value is changing in test node) in 4 new nodes like shown below so i would get: </p>
  
  <pre><code>&lt;root&gt;
   &lt;test value="2" setting="6"&gt;
     &lt;ni1 name="1" setting1="6"&gt;data....&lt;/ni1&gt;
     &lt;ni2 name="1" setting1="6"&gt;data....&lt;/ni2&gt;
     &lt;ni3 name="1" setting1="6"&gt;data....&lt;/ni3&gt;
     &lt;ni4 name="1" setting1="6"&gt;data....&lt;/ni4&gt;
     &lt;tag1&gt;data....&lt;/tag1&gt;
     &lt;tag2&gt;data....&lt;/tag2&gt;
     &lt;tag n+1&gt;data....&lt;/tag n+1&gt;
   &lt;/test&gt;
   &lt;test value ...
   .
   .
   .
   &lt;/test&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Thanks a lot for any help regarding this matter,
  eoglasi</p>