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

Re: How to transform multiple XML docs with XSLT 2.0 i

Subject: Re: How to transform multiple XML docs with XSLT 2.0 into single doc
From: Andriy Gerasika <andriy.gerasika@xxxxxxxxx>
Date: Tue, 22 Jun 2010 17:31:46 +0300
Re:  How to transform multiple XML docs with XSLT 2.0 i
On 06/22/2010 04:41 PM, Jack Bush wrote:
Hi All,

I would like to find out how to use XSLT to transform multiple XML documents into a single one, each document would have their own stylesheets. My current working solution below is capable of transforming can only handle one XML document at a time and transforming to separation files using Java, JDOM and XSLT 2.0 from Saxon 9.1 on Windows XP platform:


You should implement SAX content handler that pushes content in some intermediate format, for example, Cocoon's "zip:archive"


FileInputStream styleSheetFIS1 = new FileInputStream(C:\\styleSheet1.xsl);
BufferedInputStream styleSheetBIS1 = new BufferedInputStream(styleSheetFIS1);
TransformerFactory transformerFactory = new net.sf.saxon.TransformerFactoryImpl();
Templates templates = transformerFactory.newTemplates(new StreamSource(styleSheetBIS1));
Transformer transformer = templates.newTransformer();
JDOMSource source = new JDOMSource(originaljdomDocument1);
JDOMResult result = new JDOMResult();
Transformer.transform(source, result);
transformedjdomDocument1 = result.getDocument();
.......
Thanks a lot,
Jack

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.