Function () { final XPathType returnType = XsltCodeInsightUtil.getDeclaredType(getTag()); final XmlTag[] params = getTag().findSubTags("param", XsltSupport.XSLT_NS); final Parameter[] parameters = ContainerUtil.map2Array(params, Parameter.class, PARAM_MAPPER); return new FunctionImpl(null, returnType != null ? returnType : XPathType.UNKNOWN, parameters) { @Override public String getName() { return getQName().getLocalPart(); } }; }