title: Add an attribute with static value with xslt
body: <p>I need to add an attribute with a static value to all nodes of a specific type in an existing xml file using xslt. Basically something like this:</p>
  
  <pre><code>&lt;root&gt;
    &lt;somenode att1="something" /&gt;
    &lt;mynode id="1" att1="value1" att2="value2"/&gt;
    &lt;mynode id="2" att1="value3" att2="value4"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I need it to be like so:</p>
  
  <pre><code>&lt;root&gt;
    &lt;somenode att1="something" /&gt;
    &lt;mynode id="1" att1="value1" att2="value2" newatt="static string"/&gt;
    &lt;mynode id="2" att1="value3" att2="value4" newatt="static string"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I took a look at <a href="https://stackoverflow.com/questions/5028622/xsl-transformation-insert-attribute">this answer</a> but I was not able to use it for this case, if it could be used for what I'm trying.</p>
  
  <p>I've never used xslt before, I really need some help.</p>
  
  <p>Thanks.</p>