if (context.isProfilingEnabled(2)) context.getProfiler().end(this, "eval: " + expr, sequence);
	public Sequence eval(Sequence[] args, Sequence contextSequence)			throws XPathException {		// the current expression context		Sequence exprContext = args[0];		// get the query expression		String expr = StringValue.expand(args[1].getStringValue());		if ("".equals(expr.trim()))		  return new EmptySequence();				// save some context properties        context.pushNamespaceContext();		DocumentSet oldDocs = context.getStaticallyKnownDocuments();		context.setStaticallyKnownDocuments(exprContext.getDocumentSet());				XQueryLexer lexer = new XQueryLexer(context, new StringReader(expr));		XQueryParser parser = new XQueryParser(lexer);		// shares the context of the outer expression		XQueryTreeParser astParser = new XQueryTreeParser(context);		try {		    parser.xpath();			if(parser.foundErrors()) {				LOG.debug(parser.getErrorMessage());				throw new XPathException("error found while executing expression: " +					parser.getErrorMessage());			}			AST ast = parser.getAST();						PathExpr path = new PathExpr(context);			astParser.xpath(ast, path);			if(astParser.foundErrors()) {				throw new XPathException("error found while executing expression: " +						astParser.getErrorMessage(), astParser.getLastException());			}			long start = System.currentTimeMillis();			path.analyze(null, 0);			Sequence sequence = path.eval(exprContext, null);			path.reset();			LOG.debug("Found " + sequence.getLength() + " for " + expr);			LOG.debug("Query took " + (System.currentTimeMillis() - start));			return sequence;		} catch (RecognitionException e) {			throw new XPathException("error found while executing eval expression: " + e.getMessage(), 					e.getLine(), e.getColumn());		} catch (TokenStreamException e) {			throw new XPathException(getASTNode(), e.getMessage(), e);		} finally {			if (oldDocs != null)				context.setStaticallyKnownDocuments(oldDocs);			context.popNamespaceContext();		}	}