title: xpath for a node within a node which is a sibling of another node
body: <p>Let's say I have some html that looks like this:</p>
  
  <pre><code>&lt;section&gt;
      &lt;header&gt;
          &lt;h1&gt;Foo&lt;/h1&gt;
      &lt;/header&gt;
      &lt;section&gt;
          &lt;a href="#"&gt;one&lt;/a&gt;
      &lt;/section&gt;
      &lt;section&gt;
          &lt;a href="#"&gt;two&lt;/a&gt;
      &lt;/section&gt;
  &lt;/section&gt;
  &lt;section&gt;
      &lt;header&gt;
          &lt;h1&gt;Bar&lt;/h1&gt;
      &lt;/header&gt;
      &lt;section&gt;
          &lt;a href="#"&gt;one&lt;/a&gt;
      &lt;/section&gt;
      &lt;section&gt;
          &lt;a href="#"&gt;two&lt;/a&gt;
      &lt;/section&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>I want to get the anchor with the text of 'two' but must belong in the section tag that has the header of 'Bar' (i.e. the last anchor in the above html).</p>
  
  <p>It's easy to get the header element with the Bar text:</p>
  
  <pre><code>//header/h1[text()='Bar']
  </code></pre>
  
  <p>It's also easy to get both anchors with the text 'two' that live in a section element:</p>
  
  <pre><code>//section/a[text()='two']
  </code></pre>
  
  <p>which of course returns two anchors.</p>
  
  <p>I'm just not sure how to combine the two so that I would only got the anchor found to be in the section element that's a sibling of the header element that contains 'Bar'.</p>