DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22761>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22761 Two XSLTInputHandler constructors do not work properly (TraxInputHandler bugs) Summary: Two XSLTInputHandler constructors do not work properly (TraxInputHandler bugs) Product: Fop Version: 0.20.5 Platform: All OS/Version: Other Status: NEW Severity: Major Priority: Other Component: general AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] XSLTInputHandler has three constructors, but only one of them (XSLTInputHandler (File, File) works properly. A Driver which tries to render anything using an XSLTInputHandler created with the constructor that takes two InputStreams or the constructor that takes the URLs will crash. This is because of two bugs in the TraxInputHandler: both getInputSource() and getParser() assume that the object was created by using the (File, File) constructor. Here are my suggestions how to fix these bugs (TraxInputHandler.java) : public InputSource getInputSource() { return (this.xmlSource == null) ? InputHandler.fileInputSource(xmlfile) : xmlSource; } public XMLReader getParser() throws FOPException { // xsltSource member variable should be added and propertly initialised by the two constructors return getXMLFilter(xmlfile, (xsltSource == null) ? new StreamSource(xsltfile), xsltSource); } public static XMLFilter getXMLFilter(File xmlfile, StreamSource source) throws FOPException { .... XMLFilter xmlfilter = saxTFactory.newXMLFilter(source); .... } Hope this report will be useful... cheers, Slava --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]