/** * Call the function dynamically. For this to be possible, the static arguments of the function call * must have been set up as SuppliedParameterReference objects. The actual arguments are placed on the * callee's stack, and the type conversion takes place "in situ". * @param suppliedArguments the values to be used for the arguments of the function * @param context the dynamic evaluation context * @return the result of evaluating the function */ public ValueRepresentation dynamicCall(ValueRepresentation[] suppliedArguments, XPathContext context) throws XPathException { ValueRepresentation[] convertedArgs = new ValueRepresentation[suppliedArguments.length]; XPathContextMajor c2 = context.newCleanContext(); c2.setOrigin(this); c2.setCaller(context); c2.openStackFrame(suppliedArguments.length); for (int i=0; i<suppliedArguments.length; i++) { c2.setLocalVariable(i, suppliedArguments[i]); convertedArgs[i] = ExpressionTool.lazyEvaluate(argument[i], c2, 10); } XPathContextMajor c3 = c2.newCleanContext(); c3.setOrigin(this); return function.call(convertedArgs, c3); }
/** * Call the function dynamically. For this to be possible, the static arguments of the function call * must have been set up as SuppliedParameterReference objects. The actual arguments are placed on the * callee's stack, and the type conversion takes place "in situ". * @param suppliedArguments the values to be used for the arguments of the function * @param context the dynamic evaluation context * @return the result of evaluating the function */ public ValueRepresentation dynamicCall(ValueRepresentation[] suppliedArguments, XPathContext context) throws XPathException { ValueRepresentation[] convertedArgs = new ValueRepresentation[suppliedArguments.length]; XPathContextMajor c2 = context.newCleanContext(); c2.setOrigin(this); c2.setCaller(context); c2.openStackFrame(suppliedArguments.length); for (int i=0; i<suppliedArguments.length; i++) { c2.setLocalVariable(i, suppliedArguments[i]); convertedArgs[i] = ExpressionTool.lazyEvaluate(argument[i], c2, 10); } XPathContextMajor c3 = c2.newCleanContext(); c3.setOrigin(this); return function.call(convertedArgs, c3); }
/** * Call the function dynamically. For this to be possible, the static arguments of the function call * must have been set up as SuppliedParameterReference objects. The actual arguments are placed on the * callee's stack, and the type conversion takes place "in situ". * @param suppliedArguments the values to be used for the arguments of the function * @param context the dynamic evaluation context * @return the result of evaluating the function */ public ValueRepresentation dynamicCall(ValueRepresentation[] suppliedArguments, XPathContext context) throws XPathException { ValueRepresentation[] convertedArgs = new ValueRepresentation[suppliedArguments.length]; XPathContextMajor c2 = context.newCleanContext(); c2.setOrigin(this); c2.setCaller(context); c2.openStackFrame(suppliedArguments.length); for (int i=0; i<suppliedArguments.length; i++) { c2.setLocalVariable(i, suppliedArguments[i]); convertedArgs[i] = ExpressionTool.lazyEvaluate(argument[i], c2, 10); } XPathContextMajor c3 = c2.newCleanContext(); c3.setOrigin(this); return function.call(convertedArgs, c3); }