[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xalan problem with Strings as input/output

Subject: Xalan problem with Strings as input/output
From: Amitabh Arora <aamitabh@xxxxxxxxx>
Date: Fri, 30 Mar 2001 17:34:38 -0800 (PST)
amitabh arora
---- 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.