title: XSLT/XPath test for 'Null'
body: <p>I have the following  which checks for a string within the xml... however, I need to create another  test to check for 'Null' or no text within the variable <code>$validItems</code> at the 1st line...</p>
  
  <pre><code>&lt;xsl:if test="$validItems[(Caption | CalltoAction)[string(.)]]"&gt;
   &lt;div class="text"&gt;
     &lt;xsl:choose&gt;
       &lt;xsl:when test="$horizontal"&gt;
         &lt;div class="holder"&gt;
           &lt;div class="frame"&gt;
             &lt;div class="slides-descriptions"&gt;
               &lt;xsl:apply-templates select="$validItems" mode="horizontal"/&gt;
             &lt;/div&gt;
             &lt;div class="switcher"/&gt;
           &lt;/div&gt;
         &lt;/div&gt;
       &lt;/xsl:when&gt;
       &lt;xsl:otherwise&gt;
         &lt;div class="slides-descriptions"&gt;
           &lt;xsl:apply-templates select="$validItems" mode="vertical"/&gt;
         &lt;/div&gt;
         &lt;div class="switcher"/&gt;
       &lt;/xsl:otherwise&gt;
     &lt;/xsl:choose&gt;
   &lt;/div&gt;
  &lt;/xsl:if&gt;
  </code></pre>
  
  <p>How would I go about testing the variable xsl:if test=$validItems?
              </p>