title: How could I make xsl:value-of dynamic?
body: <p>Consider, that <code>&lt;xsl:value-of select="@select"/&gt;</code> outputs <code>/root/name</code>. The evaluated expression I want to pass to <code>value-of</code>, so it selects particular value in XML.</p>
  
  <p>Whole code I want to make work:</p>
  
  <p><strong>XML:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;root&gt;
      &lt;xsl:value-of select="/root/name"/&gt;
      &lt;name&gt;Foo&lt;/name&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p><strong>XSL:</strong></p>
  
  <pre><code>&lt;xsl:template match="xsl:value-of"&gt;                                                                                                                                                                        
      &lt;xsl:element name="{name()}"&gt;                                                                                                                                                                          
          &lt;xsl:attribute name="select"&gt;
              &lt;xsl:value-of select="@select"/&gt;
          &lt;/xsl:attribute&gt;                                                                                                                                                
      &lt;/xsl:element&gt;                                                                                                                                                                                         
  &lt;/xsl:template&gt; 
  </code></pre>
  
  <p><strong>Desired output:</strong>
  <code>Foo</code></p>
  
  <p>But it outputs nothing or with another solution it outputs just <code>/root/name</code>.</p>
  
  <p>Is it even possible to make this code work? I use XSLT 1.0.</p>
  
  <p>Thanks</p>