Subject: [xsl] Xalan problem with Strings as input/output From: Amitabh Arora <aamitabh@xxxxxxxxx> Date: Fri, 30 Mar 2001 17:34:38 -0800 (PST) |
---- 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] illegal xhtml attributes?, Dominic Tocci | Thread | [xsl] XSL Namespaces - confused, Ralof |
[xsl] illegal xhtml attributes?, Dominic Tocci | Date | Re: [xsl] xml to html paragraphing, David Carlisle |
Month |