String fragmentPath = getConfigs().getString(fragment, "fragmentPath");
if (!fragmentPath.equals("/")) {
throw new MorphlineCompilationException("Non-root fragment paths are not yet supported", config);
}
XQueryCompiler compiler = processor.newXQueryCompiler();
compiler.setErrorListener(new DefaultErrorListener());
compiler.setCompileWithTracing(isTracing);
compiler.setLanguageVersion(getConfigs().getString(config, "languageVersion", "1.0"));
XQueryExecutable executable = null;
String query = getConfigs().getString(fragment, "queryString", null);
if (query != null) {
executable = compiler.compile(query);
}
String queryFile = getConfigs().getString(fragment, "queryFile", null);
if (queryFile != null) {
executable = compiler.compile(new File(queryFile));
}
if (query == null && queryFile == null) {
throw new MorphlineCompilationException("Either query or queryFile must be defined", config);
}
if (query != null && queryFile != null) {