title: Can I select in XPath based on a variable attribute?
body: <p>I think this isn't possible but would like to have a definitive answer.</p>
  
  <p>XML:</p>
  
  <pre><code>  &lt;agentlang&gt;French&lt;/agentlang&gt;
    ...
    &lt;books&gt;
      &lt;book&gt;
        &lt;title&gt;My Book&lt;/title&gt;
        &lt;author&gt;Me&lt;/author&gt;
      &lt;/book&gt;
      &lt;book&gt;
        &lt;title&gt;XPath 101&lt;/title&gt;
        &lt;author&gt;You&lt;/author&gt;
    &lt;/book&gt;
    ...
   &lt;/books&gt;
   .....
   &lt;translations&gt;
      &lt;translation English="title" French="titre" German="Titel" /&gt;
      &lt;translation English="author" French="auteur" German="Autor" /&gt;
   &lt;/translations&gt;
  </code></pre>
  
  <p>then in the XSL there is a simple transform of the main books info, but I want the headers to be translated according to the translation xml- something like this will work:</p>
  
  <pre><code>&lt;xsl:value-of select="//translation[@English='title']/@French"/&gt;
  &lt;xsl:value-of select="//translation[@English='Author']/@French"/&gt;
  </code></pre>
  
  <p>But I want to replace the attribute @French with the agentlang value from the XML</p>
  
  <p>I'm using MSXML / XSLT 1.0</p>
  
  <p>Is there any way this can be done?</p>