title: How to use selector negation (but ...) in Enlive on a more complex HTML snippet?
body: <p>I have got an HTML snippet similar to:</p>
  
  <pre><code>&lt;div id="root"&gt;
      &lt;div id="A" attrib_2="bar"&gt;&lt;/div&gt;
      &lt;div id="B" attrib_2="baz"&gt;
          &lt;div id="H" attrib_1="gnu"&gt;
              &lt;p&gt;
                  &lt;div id="F" attrib_2="baz"&gt;&lt;/div&gt;
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="C" attrib_2="owl"&gt;&lt;/div&gt;
      &lt;div id="D" attrib_2="uhu"&gt;&lt;/div&gt;
      &lt;div id="E" attrib_2="boom"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now, I would like to select all snippets having an attrib_2 (*[attrb_2]) excluding those being descendands of a node having attrib_1 set. There can be more nesting levels with arbitrary tags (like <code>&lt;p&gt;</code> in this example). With Enlive (<a href="http://enlive.cgrand.net/" rel="noreferrer">http://enlive.cgrand.net/</a>), I have already tried something like:</p>
  
  <pre><code>(select snippet [(but (attr? :attrib_1)) (attr? :attrib_2)])
  </code></pre>
  
  <p>But this doesn't work because the negation <code>(but (attr? :attrib_1))</code> matches also the <code>&lt;p&gt;</code> tag. Is there a way to express this with the given selector predicates (<a href="http://enlive.cgrand.net/syntax.html" rel="noreferrer">http://enlive.cgrand.net/syntax.html</a>), or do I have to write my own one?</p>
  
  <p>Thanks in advance</p>
  
  <p>-Jochen</p>