// (from sitemap parameters) will be overriden, if same variables are
// supplied through the request object.
this.updateContext();
// Execute Jelly script
XMLOutput xmlOutput = new XMLOutput(this.contentHandler, this.lexicalHandler);
// TODO - Compile the script and cache the compiled version
scriptSource = this.resolver.resolveURI(this.source);
Script script = this.jellyParser.parse(SourceUtil.getInputSource(scriptSource));
script = script.compile();
// the script does not output startDocument/endDocument events
this.contentHandler.startDocument();
script.run(this.jellyContext, xmlOutput);
xmlOutput.flush();
this.contentHandler.endDocument();
} catch (IOException e) {
getLogger().error("JellyGenerator.generate()", e);
throw new ResourceNotFoundException("JellyGenerator could not find resource", e);