NOTE: This class is not typically used directly, but is exposed for writers of extended XPath packages.
Implementations of Function are functors which are used to evaluate a function-call within an XPath expression.
Function
102103104105106107108109110111112
OXPath10ExpressionBPEL20 oxpath20 = (OXPath10ExpressionBPEL20) _oxpath; if (fnQName.equals(oxpath20.qname_doXslTransform)) { return _doXslTransform; } } Function f = (Function)_extensionFunctions.get(localName); if (f != null) { return f; } }
86878889909192939495
private static FunctionContext getFunctionContext(Map<QName, Function> functions, SimpleFunctionContext context) { if (context == null) context = new SimpleFunctionContext(); for (QName qname : functions.keySet()) { Function function = functions.get(qname); context.registerFunction(qname.getNamespaceURI(), qname.getLocalPart(), function); } return context; }
90919293949596979899100
private static FunctionContext getFunctionContext( Map<QName,Function> functions, SimpleFunctionContext context) { if (context == null) context = new SimpleFunctionContext(); for (QName qname : functions.keySet()) { Function function = functions.get(qname); context.registerFunction( qname.getNamespaceURI(), qname.getLocalPart(), function); }
115116117118119120121122123124125
167168169170171172173174175176177178
public Object evaluate(Context context) throws JaxenException { String namespaceURI = context.translateNamespacePrefixToUri(getPrefix()); Function func = context.getFunction(namespaceURI, getPrefix(), getFunctionName()); List paramValues = evaluateParams(context); return func.call(context, paramValues); }
347348349350351352353354355356357358
public Object evaluate(Context context) throws JaxenException { String namespaceURI = context.translateNamespacePrefixToUri( getPrefix() ); Function func = context.getFunction( namespaceURI, getPrefix(), getFunctionName() ); List paramValues = evaluateParams(context); return func.call(context, paramValues); }
114115116117118119120121122123124