title: How to create nested conditions in XPath that refer to other nodes
body: <p>In a nested condition, how do I refer to the current node in the "outer" pair of brackets. Say I have the following xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Root&gt;
      &lt;Gizmos&gt;
          &lt;Gizmo&gt;
              &lt;Id&gt;1&lt;/Id&gt;
          &lt;/Gizmo&gt;
          &lt;Gizmo&gt;
              &lt;Id&gt;2&lt;/Id&gt;
          &lt;/Gizmo&gt;
          &lt;Gizmo&gt;
              &lt;Id&gt;3&lt;/Id&gt;
          &lt;/Gizmo&gt;
      &lt;/Gizmos&gt;
      &lt;Validations&gt;
          &lt;Validation&gt;
              &lt;Id&gt;A&lt;/Id&gt;
              &lt;GizmoId&gt;1&lt;/GizmoId&gt;
          &lt;/Validation&gt;
          &lt;Validation&gt;
              &lt;Id&gt;B&lt;/Id&gt;
              &lt;GizmoId&gt;2&lt;/GizmoId&gt;
          &lt;/Validation&gt;
          &lt;Validation&gt;
              &lt;Id&gt;C&lt;/Id&gt;
              &lt;GizmoId&gt;3&lt;/GizmoId&gt;
          &lt;/Validation&gt;
      &lt;/Validations&gt;
      &lt;Approvals&gt;
          &lt;ValidationId&gt;B&lt;/ValidationId&gt;
          &lt;ValidationId&gt;C&lt;/ValidationId&gt;
      &lt;/Approvals&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>I would like to use this code to filter out a nodeset of approved gizmos (i.e. gizmo 2 and 3):</p>
  
  <pre><code>/Root/Gizmos/Gizmo[/Root/Validations/Validation[GizmoId = ?.Id]/Id = /Root/Approvals/ValidationId]
  </code></pre>
  
  <p>Is this allowed, and if it is, what would I substitute the question mark with?</p>