Project

General

Profile

Actions

Bug #3970

closed

XSLT unnecessarily writes to a file

Added by Chris Weed over 15 years ago. Updated over 15 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
actors
Target version:
Start date:
04/10/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3970

Description

Instead of creating a temporary file that may fail, write the XSLT output to a string buffer.
//XSLT.java

StringWriter sw = new StringWriter();

// Executes the Transformer
try {
transformer.transform(xml, new StreamResult(sw));
htmlStr = sw.toString();
} catch (Exception e) {
MessageHandler.error("Transform error", e);
}

Actions

Also available in: Atom PDF