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

transformation much slower in a servlet???

Subject: transformation much slower in a servlet???
From: "Carter, Will" <WCarter@xxxxxxxxxxxxxxxx>
Date: Mon, 16 Sep 2002 17:00:42 -0500
xslt servlet
Hi,

I have an xml that is about 580k and I can transform it into an html with an xsl with xalan at my command line. It takes about 5 seconds.  This is my command line statement:

java org.apache.xalan.xslt.Process -in xml.xml -xsl xsl.xsl -out output.html

When I move this process to a servlet, I am getting about 25 seconds to transform the same xml into the same html.  Here is a snippet from my servlet.

servlet code:
---------------------
//sets up the xml file to transform
File xmlFile = new File(xml.xml);

//sets up the xsl file to do the transforming
File xsltFile = new File(xsl.xsl);

Source xmlSource = new StreamSource(xmlFile);
Source xsltSource = new StreamSource(xsltFile);
	
TransformerFactory transFact = TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource);

PrintWriter pw = new PrintWriter(new FileOutputStream(htmlFile));

trans.transform(xmlSource, new StreamResult(pw));
---------------------

I am using a number of keys in the xsl and I reference another xml file with the document() xsl function in xsl.xsl.  Could this be the cause of my delay?  Is there anyway to track what's happening in the xsl transformation when it is in a servlet?

is there anyway to find out how a transformation at the command line would take less than a transformation in a servlet.  I see no errors in my console when the servlet is transforming.

thanks for any help you can provide.
will

 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.