title: How to check if an element value is null using xsl:if
body: <p>I am trying to implement an xsl in which a node from an xml be selected only if that element exists and have some value:</p>
  
  <p>I did some research and this expression i found can be used in the test condition:</p>
  
  <pre><code>&lt;xsl:if test="/rootNode/node1" &gt;
  
   // whatever one wants to do   
  
  &lt;/xsl:if&gt;
  </code></pre>
  
  <p>Will it test for the existence of --> /rootNode/node1 only or check the contents of node1 as well? How does we check the contents of node1 in this expression that it should not be null.</p>