}
}
public Sequence<? extends Item> eval(Sequence<? extends Item> contextSeq, DynamicContext dynEnv)
throws XQueryException {
final ValueSequence argv;
final int arity = _params.size();
if(arity == 0) {
argv = null;
} else {
argv = new ValueSequence(dynEnv);
FunctionSignature sign = func.getFunctionSignature(arity);
for(int i = 0; i < arity; i++) {
XQExpression p = _params.get(i);
Sequence seq = p.eval(contextSeq, dynEnv);
Sequence converted = mapFunctionArgument(seq, sign.getArgumentType(i), dynEnv);
argv.addItem(SingleCollection.wrap(converted, dynEnv));
}
}
return func.eval(contextSeq, argv, dynEnv);
}