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
|
- problem with XSLTInputHandler(String,String) constructor Eldho George