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

Converting Document object (DOM) into inputsource for XSL pr

Subject: Converting Document object (DOM) into inputsource for XSL processing in XT
From: Sebastien Sahuc <ssahuc@xxxxxxxxxxxxxx>
Date: Thu, 26 Aug 1999 16:29:52 +0200
convert document to bytearrayoutputstream
Hi folks,

Currently, I'm working with DOM (SUN project X implementation) as a
represention of my Object. As I wish to submit the source tree through
an XSL style sheet using XT (for performance reason), I do need to
convert the DOM object into it equivalent inputsource as expressed in
the above java code :

ByteArrayOutputStream docOutputStream = new ByteArrayOutputStream();
((XmlDocument)myDOMDocument).write(docOutputStream);
ByteArrayInputStream docInputStream = new
ByteArrayInputStream(docOutputStream.toByteArray());
InputSource inputSource = new InputSource(docInputStream);
myXslProcessor.parse(inputSource);

Is there a better way to handle these opreations, since they're time
consuming in resource and memory. 

Beside this, I tried using DOM directly with XSL:P processor, but it
wasn't faster than XT solution, so I'm deducting that it take longer
to work with DOM that to parse again the XML document and then work
with it internal and lightweight representation, is it true ?

Thank for any reply, I would really appreciate.

Sebastien Sahuc
ssahuc@xxxxxxxxxxxxxx


 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.