public override int evalNodeSet(VTDNav vn) { switch (opCode) { case FuncName.CURRENT: if (state == START) { vn.loadCurrentNode(); state = END; return vn.getCurrentIndex2(); } else { return -1; } // break; case FuncName.DOCUMENT: if (argCount1 == 1) { if (!argumentList.e.NodeSet) { if (state == START) { String s = argumentList.e.evalString(vn); if (s.Length == 0) { newVN = xslVN; newVN.context[0] = -1; } else if (vg.parseFile(s, true)) { newVN = vg.getNav(); newVN.context[0] = -1; newVN.URIName = s; } else { state = END; return -1; } state = END; return 0; } else { return -1; } } else { try { if (state != END) { a = argumentList.e.evalNodeSet(vn); if (a != -1) { String s = vn.toString(getStringVal(vn, a)); if (s.Length == 0) { newVN = xslVN; newVN.context[0] = -1; } else if (vg.parseFile(s, true)) { newVN = vg.getNav(); newVN.context[0] = -1; newVN.URIName = s; } else { state = END; return -1; } state = END; return 0; } else { state = END; return -1; } } else return -1; } catch (NavException e) { } } } break; case FuncName.KEY: throw new XPathEvalException(" key() not yet implemented "); // break; } throw new XPathEvalException(" Function Expr can't eval to node set "); }