Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2005, 01:11 PM
Authorized User
 
Join Date: Sep 2005
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Java & XSLT

Hello,
first of all, please excuse my not so great english,
i am trying to do a filter that will take the processed jsp file (the jsp makes a XML file), and then pass it on a XSLT processor
I have a filter that does something like:

TransformerFactory transformerfactory = TransformerFactory.newInstance();
Transformer transformer = transformerfactory.newTransformer(new javax.xml.transform.stream.StreamSource("teste.xsl t"));
transformer.transform(xmlSource, new StreamResult(printwriter));

The xmlSource comes from:

String str = new String(wrapper.getBuffer());
StringReader sr = new StringReader(str);
StreamSource xmlSource = new StreamSource(sr);

The wrapper is a BufferedResponseWrapper i found on the internet

The problem is i keep getting this error that says:
org.xml.sax.SAXParseException: Premature end of file.


I don't know if this is enough info, but if you could please help me
thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using XSLT and JAVA trinkets XSLT 4 April 4th, 2007 02:13 PM
XSLT and JAVA bonekrusher XSLT 3 August 9th, 2006 07:38 PM
XSLT 2.0 Transformation and JAVA markus2000 XSLT 1 June 21st, 2006 08:33 AM
XSLT with Java Hind XSLT 1 May 24th, 2006 04:18 AM
binding java from xslt mountainbiker XSLT 2 February 19th, 2004 11:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.