[kepler-dev] [Bug 3970] New: - XSLT unnecessarily writes to a file

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Fri Apr 10 08:31:14 PDT 2009


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3970

           Summary: XSLT unnecessarily writes to a file
           Product: Kepler
           Version: 1.x dev
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: actors
        AssignedTo: berkley at nceas.ucsb.edu
        ReportedBy: chrisweed at gmail.com
         QAContact: kepler-dev at kepler-project.org


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);
}


More information about the Kepler-dev mailing list