Value value = expr.eval(ndocs, null, null);
Value value = expr.eval(context, ndocs, null, null);
	public org.exist.soap.QueryResponse query(String sessionId, java.lang.String query)		throws java.rmi.RemoteException {		Session session = SessionManager.getInstance().getSession(sessionId);		if (!(query.startsWith("document(") || query.startsWith("collection(")))			query = "document(*)" + query;		QueryResponse resp = new QueryResponse();		resp.setHits(0);		try {			XPathLexer lexer = new XPathLexer(new StringReader(query));			XPathParser parser = new XPathParser(pool, session.getUser(), lexer);			PathExpr expr = new PathExpr(pool);			parser.expr(expr);			LOG.info("query: " + expr.pprint());			long start = System.currentTimeMillis();			if (parser.foundErrors())				throw new RemoteException(parser.getErrorMsg());			DocumentSet ndocs = expr.preselect();			if (ndocs.getLength() == 0)				return resp;			Value value = expr.eval(ndocs, null, null);			QueryResponseCollection[] collections = null;			if (value.getType() == Value.isNodeList)				collections = collectQueryInfo(scanResults(value.getNodeList()));			session.addQueryResult(value);			resp.setCollections(collections);			resp.setHits(value.getNodeList().getLength());			resp.setQueryTime(System.currentTimeMillis() - start);		} catch (Exception e) {			throw new RemoteException("query execution failed: " + e.getMessage());		}		return resp;	}