* @throws IOException
*/
public Template(String path, InputStream input) throws TemplateException {
try {
this.path = path;
this.doc = Jsoup.parse(input, "UTF-8", "", new Parser(new BlockTagSupportHtmlTreeBuilder()));
// this.doc = Jsoup.parse(input, "UTF-8", "");
initDocument();
} catch (Exception e) {
String msg = String.format("Template %s initialize failed.", path);
throw new TemplateException(msg, e);