title: XPath one of multiple attribute values with condition
body: <p>Given the following expression, how can I use <code>=</code> to be more concise and explicit?</p>
  
  <pre><code>(//h2/@id[contains(.,"foo") or contains(.,"bar") or contains(.,"baz"))[last()]
  </code></pre>
  
  <p>Here's what I tried, but my interpreter says it's not valid:</p>
  
  <pre><code>(//h2/@id[text() = ("foo", "bar", "baz")])[last()]
  </code></pre>
  
  <p>I cannot use <code>contains()</code> because I need to guard against substring matches. I'm using XPath 1.0 and <a href="https://stackoverflow.com/a/12155466/712334">an answer to a related question</a> is the impetus for this question. </p>