XPathExpression xpexp = xpath.createExpression(args[1]);
exp = xpexp.getInternalExpression();
} else if (args[0].equals("xquery")) {
StaticQueryContext sqc = new StaticQueryContext(config);
sqc.setBaseURI(new File(args[1]).toURI().toString());
XQueryExpression xqe = sqc.compileQuery(new FileReader(args[1]));
exp = xqe.getExpression();
} else {
throw new IllegalArgumentException("first argument must be xpath or xquery");
}
exp.explain(System.err);
PathMap initialPath = new PathMap(exp);