// we can write directly to the Result
t.transform(source, result);
else if (var != null) {
// we need a Document
Document d = db.newDocument();
Result doc = new DOMResult(d);
t.transform(source, doc);
pageContext.setAttribute(var, d, scope);
} else {
Result page =
new StreamResult(new SafeWriter(pageContext.getOut()));
t.transform(source, page);
}
return EVAL_PAGE;