* Query. This is a very efficient way of invoking a query, but it does minimal
* checking of the supplied arguments
*/
public static void exampleDirectFunction() throws XPathException {
final StaticQueryContext sqc = new StaticQueryContext(new Configuration());
final XQueryExpression exp1 = sqc.compileQuery("declare namespace f='f.ns';" +
"declare function f:t1($v1 as xs:integer, $v2 as xdt:untypedAtomic*) { " +
" $v1 div $v2" +
"};" +
"10");
final UserFunction fn1 = sqc.getUserDefinedFunction("f.ns", "t1", 2);
final Controller controller = exp1.getController();
final Value[] arglist = new Value[2];
arglist[0] = new IntegerValue(10);
for (int i=3; i<10; i++) {
arglist[1] = new IntegerValue(i);