When I put <xsl:include href="testinclude.xsl"> tag in xsl stylesheet, fop ends with following error: [INFO] FOP 0.20.4 [ERROR] null Fop is used from command prompt: fop -xml test.xml -xsl test.xsl -pdf test.pdf I can send complete examples of test.xsd, if needed. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:nsdc="http://www.rtf2fo.com/NSDC" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="nsdc:data"> <fo:root> .... </fo:root> </xsl:template> <xsl:include href="testempty.xsl"> </xsl:stylesheet>
Created attachment 6614 [details] Examples of xsd and xsl files used for generating PDF
This is no FOP problem. Your test.xsl is not well-formed. Change: <xsl:include href="testempty.xsl"> to: <xsl:include href="testempty.xsl"/> If you run into problems like this, run the XSL transformation alone (without FOP), check for error messages and check if the output from the XSL transformation is the output you expect. More information here: http://xml.apache.org/fop/faq.html#NullPointerException
Actually, I believe (respectfully) that the bug is in your XSL. First of all, the xsl:include tag is not closed (although that may be just a typo). 2ndly, according to everywhere I've read, (XML Bible, the XSL spec, etc.): The xsl:include element is only allowed as a top-level element. That means it should be something like this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:nsdc="http://www.rtf2fo.com/NSDC" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:include href="testempty.xsl"/> <xsl:template match="nsdc:data"> <fo:root> .... </fo:root> </xsl:template> </xsl:stylesheet> Hope this helps! Web Maestro Clay
batch transition to closed remaining pre-FOP1.0 resolved bugs