title: How to check if an XML node contains text
body: <p>How can I check if a XML node contains text, or only empty nodes?</p>
  
  <p>Example: Let's say we have the following XML:</p>
  
  <pre><code>&lt;text&gt;
     &lt;p&gt; &lt;/p&gt;
     &lt;p&gt; &lt;/p&gt;
  &lt;/text&gt;
  </code></pre>
  
  <p>(Note the whitespace between the p tags)</p>
  
  <p>In a different XML, we have the following XML:</p>
  
  <pre><code>&lt;text&gt;
     &lt;p&gt;Hello World!&lt;/p&gt;
  &lt;/text&gt;
  </code></pre>
  
  <p>I'd like the test to pass in the second example, but not in the first, as the second example contains text, but the first contains empty nodes. </p>
  
  <p>Is there a way to easily achieve this?</p>
  
  <p>(I use XSLT 2.0.)</p>