title: Java/XSLT: Cannot find a matching 1-argument function
body: <p>I get the following error:</p>
  
  <pre><code>javax.servlet.ServletException: Cannot find a matching 1-argument function named {http://exslt.org/dynamic}evaluate()
  at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
  at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
  </code></pre>
  
  <p>The top of my xslt file is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      version="1.0"   
      xmlns:dyn="http://exslt.org/dynamic" 
      extension-element-prefixes="dyn"&gt; 
  </code></pre>
  
  <p>Do you know why I may be getting this error?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The top of my XML file now reads.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet 
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
       version="1.0"
       xmlns:xalan="http://xml.apache.org/xalan" 
       exclude-result-prefixes="xalan"&gt;
  </code></pre>
  
  <p>and the XML where we are failing is</p>
  
  <pre><code>&lt;xsl:template name="test"&gt;
    &lt;xsl:param name="param" /&gt;
    &lt;xsl:value-of select="$param"/&gt;
    &lt;xsl:value-of select="xalan:evaluate($param)"/&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>This codes works on one server running Tomcat 5.0 but is not working on a server running Tomcat 5.5. I imagine because the code is working on one server and not it is an environmental problem. </p>
  
  <p>The XSLT is being applied to the XML via a JSP page. To me it looks like the xalan.jar file is not being used. The top of the JSP is:</p>
  
  <pre><code>&lt;%@page import="javax.xml.transform.*"%&gt;
  &lt;%@page import="javax.xml.transform.stream.*"%&gt;
  &lt;%@page import="         java.security.Principal,
               java.net.URL, 
               java.net.URLConnection, 
               java.io.InputStream,
               java.io.InputStreamReader,
               java.io.Reader,
               java.io.BufferedReader,
               java.io.File,
               javax.xml.transform.*,
               javax.xml.transform.stream.*,
               javax.xml.transform.*,
               javax.xml.transform.stream.*"%&gt;
  </code></pre>
  
  <p><strong>Update</strong>
  The problem is that Saxon is being chosen as the XML parser. Saxon does not support this functionality. Removing the Saxon.jar fixes the problem.</p>