title: How to check if node is empty
body: <p>I'm trying to make a variable, which tells me, whether node1 has something in it or not. node1 can be an empty element  or it may contain an attribute. But right now I would like to know how achieve answer "false" when the node1 is empty .</p>
  
  <pre><code>&lt;xsl:variable name="elementHasData"&gt;
      &lt;xsl:choose&gt;
          &lt;xsl:when test="node1 != ''"&gt;
              &lt;xsl:value-of select="true()"/&gt;
          &lt;/xsl:when&gt;
          &lt;xsl:otherwise&gt;
              &lt;xsl:value-of select="false()"/&gt;
          &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
  &lt;/xsl:variable&gt;
  </code></pre>