title: How do we change the value of a variable based on another variable?
body: <p>I have two variables named <strong>editable</strong> and <strong>display</strong>.</p>
  
  <p>If the value of <strong>editable</strong> is <code>true</code>, I want to set the value of <strong>display</strong> to <code>'block'</code>.</p>
  
  <p>If the value of <strong>editable</strong> is <code>false</code>, I want to set the value of <strong>display</strong> to <code>'none'</code>.</p>
  
  <p>This is what I have currently:</p>
  
  <pre><code>   &lt;xsl:param name="editable" select="true()"/&gt;
     &lt;xsl:choose&gt;
        &lt;xsl:when test="$editable"&gt;
           &lt;xsl:variable name="display" select="'block'"/&gt;
        &lt;/xsl:when&gt;
        &lt;xsl:otherwise&gt;
           &lt;xsl:variable name="display" select="'none'"/&gt;
        &lt;/xsl:otherwise&gt;
     &lt;/xsl:choose&gt;
  </code></pre>
  
  <p>The code above doesn't set the value of <code>display</code> to <code>none</code>.</p>
  
  <p>How do we change the value of a variable based on another variable?</p>