[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Xalan problem with Strings as input/output
---- begin Sample Code ---- public class XslUtil { public static String transform(String xslFile, String xmlString) { try { File file = new File(xslFile); StreamSource xslSource = new StreamSource(file); xslSource.setSystemId(xslFile); xslSource.setPublicId(xslFile); TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(xslSource); StringReader reader = new StringReader(xmlString); StringWriter writer = new StringWriter(); transformer.transform(new StreamSource(reader), new StreamResult(writer)); writer.flush(); return writer.toString(); } catch (Exception e) { e.printStackTrace(); } } } ---- End Sample Code ---- When I call this method from main of a my java class, and I print out the return string to System.out, everyting works ok. But if I call this method from some other java application which is continuously running then the return string value is null. Do you see anything obvious that I am missing? Is there any way to debug this? I am using the Xalan 2.0 tool. Thanks. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|