title: Condition to get value in XML and XSLT
body: <p>I have xml</p>
  
  <pre><code>&lt;out&gt;   
    &lt;settings&gt;
      &lt;setting name="address1" addr="test1"/&gt;
      &lt;setting name="address2" addr="test2"/&gt;
      &lt;setting name="address3" addr="test3"/&gt;
      &lt;setting name="address4" addr="test4"/&gt;
    &lt;/settings&gt;
  &lt;/out&gt;
  </code></pre>
  
  <p>I want to get value if condition for name attribute match with corresponding value
  for example: Get test3 if condition is name="address3"</p>
  
  <p>something like below which gives me result test1 and that is wrong</p>
  
  <pre><code> &lt;xsl:if test="/out/settings/setting/@name='address3'"&gt;
          &lt;xsl:value-of select="/out/settings/setting/@addr"/&gt;
   &lt;/xsl:if&gt;
  </code></pre>