title: Filter Mediator on XPATH Functions
body: <p>I am facing a problem with my code using Filter mediator and XPATH functions. What I am trying to do in my code is to check if a particular block is empty, do not call/enrich that block and move to another one checks for if it is empty, if not process it and moves to next one and in the end do a commit. Currently I am getting the error as:</p>
  
  <p>FilterMediator Error evaluating XPath expression : fn:exists($body/product/simpleProduct/standardAttributes)</p>
  
  <pre><code>My code is as follows:
  &lt;inSequence&gt;
           &lt;log level="custom"&gt;
              &lt;property name="STATUS" value="************ REQUEST ***************"/&gt;
           &lt;/log&gt;
           &lt;transaction action="new"/&gt;
           &lt;filter xpath="fn:exists($body/product/simpleProduct/standardAttributes)"&gt;
            &lt;/filter&gt;           
           &lt;enrich&gt;
              &lt;source type="body" clone="true"/&gt;
              &lt;target type="property" property="MSG_PAYLOAD"/&gt;
           &lt;/enrich&gt;
           &lt;log level="full"/&gt;
           &lt;xslt key="simpleAttributes"/&gt;
           &lt;log level="custom"&gt;
              &lt;property name="STATUS"
                        value="*********INSERTING Simple Product Attributes *************"/&gt;
           &lt;/log&gt;
  
  &lt;/inSequence&gt;
  </code></pre>
  
  <p>It fails at fn:exists(). Can you help me with your inputs where am I going wrong?</p>