/**
* Look for a function in the registered XPathFunctionResolvers.
* @param iri The URI of the function to find.
* @return The requested XPathFunction, or <code>null</code> if not found.
*/
private XPathFunction findFunction(IRI iri, int argCount) {
String label = iri.toString() + "/" + argCount;
XPathFunction result = fnCache.get(label);
if (result == null) {
QName fnName = iri.getQName();
if (fnName == null) return null;
for (XPathFunctionResolver resolver: FunctionResolverRegistry.getFunctionResolverRegistry()) {
try {
result = resolver.resolveFunction(fnName, argCount);
if (result != null) {
fnCache.put(label, result);
break;
}
} catch (Exception e) {
// this resolver is unable to handle the given QName
result = null;
}
}
}
return result;
}
ExternalFn.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:mulgara
作者:
评论列表
文章目录