parser.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
parser.setProperty("http://cyberneko.org/html/properties/names/attrs", "lower");
parser.parse(new InputSource(scriptStream));
} catch(Exception e) {
final ScriptException se = new ScriptException("Error parsing script " + scriptPath);
se.initCause(e);
throw se;
}
final Document template = parser.getDocument();
// compute default rendering