This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Passing an already parsed document into an xalan processor
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] Passing an already parsed document into an xalan processor
- From: "Deirdre O'Brien" <ddo at qad dot com>
- Date: Mon, 12 Mar 2001 09:51:23 +0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello All,
I am using the xalan processor to transform my xml. I want to pass an xml
document that is already parsed into the processor. I do this using the
following code. (PROCESSOR: xalan 2_0_D07)
TransformerFactory tFactory;
Transformer transformer;
DOMSource xmlSource;
xmlSource = new DOMSource(<<xml Document of type Document>>);
tFactory = TransformerFactory.newInstance();
transformer = tFactory.newTransformer(new StreamSource(<<xslt
filename>>));
transformer.transform(xmlSource,new StreamResult(<<output
stream>>));
This code works fine, but when I put a timestamp around the transformation
it takes twice as long to process then when I pass in an inputstream .
Should this be the case? I thought that because the xml data was already
parsed it would be quicker to process.
I am using XSLT to dynamically create html pages on the fly from xml data.
This is for a pre-existing application, so performance is very important.
Thanks a million,
Deirdre O'Brien
___________________________________________________________________________
_____
Deirdre O'Brien
QAD Ireland,
Hamilton House,
National Technological Park,
Limerick,
Ireland.
PHONE: ++ 353 61 213638 EMAIL: ddo@qad.com
FAX: ++ 353 61 213990 WEB: www.qad.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list