title: What is the difference between the xpath //*[.="Foo"] and the xpath //*["Foo"] with only a string in the predicate?
body: <p>Doing some testing in iPython with a new (to me) way of selecting nodes based on their text in an xpath. (Irrelevant lines omitted for clarity)</p>
  <pre><code>In [26]: from lxml import etree
  
  In [41]: string = '''
      ...: &lt;outer&gt;
      ...:    &lt;mid&gt;
      ...:       &lt;inner&gt;Foo&lt;/inner&gt;
      ...:    &lt;/mid&gt;
      ...: &lt;/outer&gt;
      ...: '''
  
  In [43]: root = etree.fromstring(string)
  
  In [44]: root.xpath('//inner[text()=&quot;Foo&quot;]')
  Out[44]: [&lt;Element inner at 0x10a0387c0&gt;]
  
  In [45]: root.xpath('//inner[.=&quot;Foo&quot;]')
  Out[45]: [&lt;Element inner at 0x10a0387c0&gt;]
  
  In [47]: root.xpath('//inner[&quot;Foo&quot;]')
  Out[47]: [&lt;Element inner at 0x10a0387c0&gt;]
  </code></pre>
  <p>That all makes sense to me so far. However:</p>
  <pre><code>In [48]: root.xpath('//*[text()=&quot;Foo&quot;]')
  Out[48]: [&lt;Element inner at 0x10a0387c0&gt;]
  
  In [49]: root.xpath('//*[.=&quot;Foo&quot;]')
  Out[49]: [&lt;Element inner at 0x10a0387c0&gt;]
  
  In [50]: root.xpath('//*[&quot;Foo&quot;]')
  Out[50]: 
  [&lt;Element outer at 0x10a188200&gt;,
   &lt;Element mid at 0x10a01d6c0&gt;,
   &lt;Element inner at 0x10a0387c0&gt;]
  </code></pre>
  <p>I had expected the second and third xpaths to produce the same result by matching all three nodes. Can anyone explain why they're different?</p>