try {
XplBuilder xplBuilder = new XplBuilder();
Pipeline xpl = (Pipeline) xplBuilder.build(reader);
xpl.getEnv().setSling(helper);
xpl.eval();
} catch (Throwable t) {
log.error("Failure running XProc script.", t);
final ScriptException se = new ScriptException("Failure running XProc script " + scriptName);
se.initCause(t);
throw se;