title: How to create nodes dynamically in XSLT?
body: <p>I have run into a problem with XSLT transformation. I have input XML as bellow:</p>
  
  <pre><code>&lt;root&gt;
      &lt;photoname&gt;image&lt;/photoname&gt;
      &lt;photocount&gt;3&lt;/photocount&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>and i need transform it to following XML:</p>
  
  <pre><code>&lt;root&gt;
      &lt;response&gt;
          &lt;images&gt;
              &lt;image&gt;
                  &lt;small&gt;image_1_120.jpg&lt;/small&gt;              
              &lt;/image&gt;
          &lt;/images&gt;
          &lt;images&gt;
              &lt;image&gt;
                  &lt;small&gt;image_2_120.jpg&lt;/small&gt;              
              &lt;/image&gt;
          &lt;/images&gt;
          &lt;images&gt;
              &lt;image&gt;
                  &lt;small&gt;image_3_120.jpg&lt;/small&gt;              
              &lt;/image&gt;
          &lt;/images&gt;
      &lt;/response&gt; 
  &lt;/root&gt;
  </code></pre>
  
  <p>Is it possble to do with XSLT(or with C# functions in XSLT)?</p>