if (translet == null ) {
String templateUrl = (String)context.get("templateUrl");
String templateString = (String)context.get("templateString");
Document templateDocument = (Document)context.get("templateDocument");
Source templateSource = getSource(templateDocument, templateUrl, templateString);
translet = tFactory.newTemplates(templateSource);
if (UtilValidate.isNotEmpty(templateName)) {
xslTemplatesCache.put(templateName, translet);
}
}
if (translet != null ) {