title: xpath remove nodes based on child's attribute value
body: <p>I have this xml code:</p>
  
  <pre><code>&lt;osm&gt;
    &lt;count&gt;
      &lt;tag k="nodes" v="608"/&gt;   
    &lt;/count&gt;
    &lt;node&gt;
      &lt;tag k="addr:housenumber" v="5-10"/&gt;
      &lt;tag k="addr:postcode" v="BA1 2BX"/&gt;
    &lt;/node&gt;
    &lt;way&gt;
      &lt;tag k="amenity" v="nightclub"/&gt;
      &lt;tag k="facebook" v="https://www.facebook.com"/&gt;
    &lt;/way&gt;
    &lt;node&gt;
      &lt;tag k="amenity" v="cafe"/&gt;
      &lt;tag k="addr:postcode" v="BS3 2BX"/&gt; 
    &lt;/node&gt;
    &lt;node&gt;
      &lt;tag k="amenity" v="school"/&gt;
      &lt;tag k="facebook" v="https://www.facebook.com"/&gt;
    &lt;/node&gt;
    &lt;way&gt;
      &lt;tag k="amenity" v="church"/&gt;
      &lt;tag k="addr:postcode" v="BAX 5RT"/&gt;   
    &lt;/way&gt;
  &lt;/osm&gt;
  </code></pre>
  
  <p>I need to remove all nodes below <code>&lt;osm&gt;</code> which contain a <code>&lt;tag&gt;</code> node with the attribute <code>k</code> with the value <code>'addr:postcode'</code>:</p>
  
  <pre><code>&lt;osm&gt;
    &lt;count&gt;
      &lt;tag k="nodes" v="608"/&gt;   
    &lt;/count&gt;
    &lt;way&gt;
      &lt;tag k="amenity" v="nightclub"/&gt;
      &lt;tag k="facebook" v="https://www.facebook.com"/&gt;
    &lt;/way&gt;
    &lt;node&gt;
      &lt;tag k="amenity" v="school"/&gt;
      &lt;tag k="facebook" v="https://www.facebook.com"/&gt;
    &lt;/node&gt;
  &lt;/osm&gt;
  </code></pre>
  
  <p>I've tried many permutations around this query, but it returns every occurrence of <code>&lt;tag&gt;</code>:</p>
  
  <pre><code>&lt;xsl:apply-templates select="osm/*/tag[not(@k='addr:postcode')]"&gt; 
  </code></pre>
  
  <p>I assume I need to find the parent, but that's where my knowledge runs out. </p>