* the function call, but no function was found.
*/
public Expression bind(StructuredQName functionName, Expression[] staticArgs, StaticContext env, Container container)
throws XPathException {
UserFunction fn = functions.get(makeKey(functionName, staticArgs.length));
if (fn == null) {
return null;
}
ExpressionVisitor visitor = ExpressionVisitor.make(env, fn.getExecutable());
UserFunctionCall fc = new UserFunctionCall();
fc.setFunctionName(functionName);
fc.setArguments(staticArgs);
fc.setFunction(fn);
fc.checkFunctionCall(fn, visitor);
fc.setStaticType(fn.getResultType(config.getTypeHierarchy()));
return fc;
}