title: XSLT - How to select XML Attribute by Attribute?
body: <p>this is the structure of my source xml:</p>
  
  <pre><code>&lt;root&gt;
  &lt;DataSet Value="A"&gt;
  &lt;Data Value1="1" Value2="anythingA1" /&gt;
  &lt;Data Value1="2" Value2="anythingA2" /&gt;
  &lt;Data Value1="3" Value2="anythingA3" /&gt;
  &lt;Data Value1="4" Value2="anythingA4" /&gt;
  &lt;Data Value1="5" Value2="anythingA5" /&gt;
  &lt;/DataSet&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>from which I like to create some variables e.g. from all with Value1="2" and all with Value1="5" should result myVar1 with anythingA2 and myVar2 with anythingA5</p>
  
  <p>My approch looks like this</p>
  
  <pre><code>&lt;xsl:variable name="myVarA" select="/DataSet/Data/[@Value1='2']/@Value2" /&gt;
  </code></pre>
  
  <p>but of course is not working since Value2 is no child of Value1.</p>
  
  <p>thanks for any hints in advance!</p>