<p>Say I have the following XML...</p>

<pre><code>&lt;root&gt;
  &lt;base&gt;
    &lt;tent key="1" color="red"/&gt;
    &lt;tent key="2" color="yellow"/&gt;
    &lt;tent key="3" color="blue"/&gt;
  &lt;/base&gt;
  &lt;bucket&gt;
    &lt;tent key="1"/&gt;
    &lt;tent key="3"/&gt;
  &lt;/bucket&gt;
&lt;/root&gt;
</code></pre>

<p>...what would the XPath be that returns that the "bucket" contains "red" and "blue"?</p>

I think this will work:
```
```
/root/base/tent[/root/bucket/tent/@key = @key ]/@color
```
```