public Object evaluate(Context context) throws UnresolvableException { String prefix = getPrefix(); String namespaceURI = null; // default namespace is not used within XPath expressions if (prefix != null && !"".equals(prefix)) { namespaceURI = context.translateNamespacePrefixToUri( prefix ); } return context.getVariableValue( namespaceURI, prefix, localName ); }
public Object evaluate(Context context) throws JaxenException { String prefix = getPrefix(); String namespaceURI = null; // default namespace is not used within XPath expressions if (prefix != null && !"".equals(prefix)) { namespaceURI = context.translateNamespacePrefixToUri(prefix); } Function func = context.getFunction(namespaceURI, prefix, getFunctionName()); List paramValues = evaluateParams(context); return func.call(context, paramValues); }