The new InputStream(String) constructor takes an XML SystemID, not the XML Content. Try wrapping your XML content in a StringReader. (*Chris*)
Original Message ----------------------- Hi all, I have problem with XsltInputHandler. I tried with the following code.But its not working.I worked with XsltInputHandler (file,file)constructor. It worked fine.Please tell me what is the problem.I want to pass xml and xsl as string.Please help me.Thanks in advance xsl is a string contains my xsl file xml is a string contains my xml file InputSource is1=new InputSource(xsl); InputSource is2=new InputSource(xml); XSLTInputHandler inputHandler = new XSLTInputHandler(is1,is2); //XSLTInputHandler inputHandler = new XSLTInputHandler(xml,xsl); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); driver.setOutputStream(outStream); driver.render(inputHandler.getParser(), inputHandler.getInputSource()); byte[] content = outStream.toByteArray(); res.setContentLength(content.length); res.setContentType("application/pdf"); res.getOutputStream().write(content); res.getOutputStream().flush(); outStream.close(); //I ALSO TRIED WITH XSLTInputHandler inputHandler = new XSLTInputHandler(xml,xsl); // means XSLTInputHandler(String,String) constructor ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]