title: XSLT 1.0 replace value from variable
body: <p>I have an xml file where a section is defined for environment. I'd like to have the XSLT contain a key/value pair that would override those values. for example:</p>
  
  <p>Sample INPUT XML - YES, variable is nested</p>
  
  <pre><code>&lt;root&gt;
  &lt;folders/&gt;
  &lt;variables&gt;
    &lt;variable&gt;
      &lt;name&gt;homeserver&lt;/name&gt;
      &lt;value&gt;myServer.com&lt;/value&gt;
      &lt;variable&gt;
      &lt;name&gt;workserver&lt;/name&gt;
      &lt;value&gt;work.com&lt;/value&gt;
      &lt;/variable&gt;
      &lt;/variable&gt;
  &lt;/variables&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Sample XLST in meta code:</p>
  
  <pre><code>&lt;xsl:variable name=KeyPair&gt;
    &lt;environment&gt;
      &lt;item name="homeserver" value="testhomeserver.com"&gt;
      &lt;item name="workserver" value="testworkserver.com"&gt;
  &lt;/xsl:variable&gt;
  
  &lt;xsl:magic happens here /&gt;
  </code></pre>
  
  <p>Intended output:</p>
  
  <pre><code>&lt;root&gt;
  &lt;folders/&gt;
  &lt;variables&gt;
    &lt;variable&gt;
      &lt;name&gt;homeserver&lt;/name&gt;
      &lt;value&gt;testhomeserver.com&lt;/value&gt;
      &lt;variable&gt;
      &lt;name&gt;workserver&lt;/name&gt;
      &lt;value&gt;testworkserver.com&lt;/value&gt;
      &lt;/variable&gt;
      &lt;/variable&gt;
  &lt;/variables&gt;
  &lt;/root&gt;
  </code></pre>