title: XPath - select all elements except element (and it's subelements) with given attribute
body: <p>I'm using xinclude to include some parts of document in another document, for example, in my main document I have:</p>
  
  <pre><code>&lt;document&gt;
    &lt;xi:include href="included.xml"
     xpointer = "xpointer(*//[@condition="cond1" or not(@condition)])"
     xmlns:xi="http://www.w3.org/2001/XInclude" /&gt;
  &lt;/document&gt;
  </code></pre>
  
  <p>And my included.xml looks like:</p>
  
  <pre><code>&lt;root&gt;
    &lt;chapter&gt;
       &lt;section condition="cond1"&gt;
         &lt;para&gt; Condition 1 Para &lt;/para&gt;
       &lt;/section&gt;
  
       &lt;section condition="cond2"&gt;
         &lt;para&gt; Condition 2 Para &lt;/para&gt;
       &lt;/section&gt;
    &lt;/chapter&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>My question is, how can I select everything, retaining the proper structure EXCEPT element with attribute condition="cond2" and also none of it's child elements? So I want to select</p>
  
  <pre><code>&lt;root&gt;
    &lt;chapter&gt;
       &lt;section condition="cond1"&gt;
         &lt;para&gt; Condition 1 Para &lt;/para&gt;
       &lt;/section&gt;
    &lt;/chapter&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>The xpointer I have there doesn't work:</p>
  
  <pre><code>xpointer(*//[@condition="cond1" or not(@condition)])
  </code></pre>