for the constructors that take strings, the strings are not the contents of the the file but a systemid (url to a file ). If you have your xml and xsl in strings your can use a StringReader or a ByteArrayInputStream
InputSource( new ByteArrayInputStream( xml.getBytes() ) ); ----- Original Message ----- From: Eldho George <[EMAIL PROTECTED]> Date: Fri, 17 Sep 2004 17:40:28 +0530 Subject: problem with XSLTInputHandler(String,String) constructor To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 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]