This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Xalan problem with Strings as input/output
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] Xalan problem with Strings as input/output
- From: Amitabh Arora <aamitabh at yahoo dot com>
- Date: Fri, 30 Mar 2001 17:34:38 -0800 (PST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
---- 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