title: Xpath for matching all text nodes in a document except text nodes in specific elements
body: <p>Attemping to build a template in XSLT to match on a specific Xpath case.</p>
  
  <p>In this example XML document I want to match on all the text in the entire document except for in <code>&lt;x&gt;</code>:</p>
  
  <pre><code>&lt;root&gt;
   &lt;tag1&gt; I want this text &lt;/tag1&gt;
   &lt;tag2&gt; I want this text &lt;/tag2&gt;
   &lt;x&gt; I don't want to match on this text &lt;/x&gt;
   &lt;tag3&gt; I want this text &lt;/tag3&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Any ideas on this Xpath? I'm trying to build a template for it to transform my document for this specific case.</p>
  
  <p>What I have come up with some far is something like this that's not working:</p>
  
  <pre><code>&lt;xsl:template match="text()[not(matches(.,x))]"&gt;
  </code></pre>
  
  <p>Any ideas?</p>