title: Check item count before for-each in XSLT / Umbraco
body: <p>I am working with XSLT files in an Umbraco solution. </p>
  
  <p>I want the entire ul tag to disappear if there is no elements to be shown:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;xsl:for-each select="umbraco.library:GetXmlNodeById($source)/child::* [@isDoc and string(umbracoNaviHide) != '1']"&gt;
      &lt;li&gt;
        &lt;a href="{umbraco.library:NiceUrl(@id)}" class="menuitem"&gt;
          &lt;xsl:value-of select="@nodeName"/&gt;
        &lt;/a&gt;
      &lt;/li&gt;
    &lt;/xsl:for-each&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>How can I make a IF statement that skips the entire codeblock if the foreach loop has no items?</p>