@Override public boolean eq(final ANode node) { // no database node if (!(node instanceof DBNode)) return false; // ensure that the pre value is contained in the target documents final DBNode db = (DBNode) node; return data == db.data() && pres.contains(db.pre()); }
@Override public Str item(final QueryContext qc, final InputInfo ii) throws QueryException { ANode node, par = toNode(exprs[0], qc); do { node = par; par = node.parent(); } while (par != null); final DBNode dbn = toDBNode(node); return dbn.kind() == Data.DOC ? Str.get(dbn.data().text(dbn.pre(), true)) : Str.ZERO; }