private bool compareVV(int k, VTDNav vn, int j, int op) { int i = vn.XPathStringVal_Matches(k, vn, j); switch (i) { case -1: if (op == NE || op == LT || op == LE) { return(true); } break; case 0: if (op == EQ || op == LE || op == GE) { return(true); } break; case 1: if (op == NE || op == GE || op == GT) { return(true); } break; } return(false); }
private bool compNodeSetString(Expr left, Expr right, VTDNav vn, int op) { int i, i1 = 0, stackSize; String s; try { s = right.evalString(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = left.evalNodeSet(vn)) != -1) { int t = vn.getTokenType(i); if (t != VTDNav.TOKEN_STARTING_TAG && t != VTDNav.TOKEN_DOCUMENT) { i1 = getStringVal(vn, i); // if (i1==-1 && s.length()==0) //return true; if (i1 != -1) { bool b = compareVString1(i1, vn, s, op); if (b) { left.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return(b); } } } else { bool b = vn.XPathStringVal_Matches(i, s); if (b) { left.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return(b); } } } vn.contextStack2.size = stackSize; vn.pop2(); left.reset(vn); return(false); // compareEmptyNodeSet(op, s); } catch (Exception e) { throw new System.SystemException("Undefined behavior"); } }