Description of problem: Running attached .fo files with two .png files crashes fop with the attached backtrace. Version-Release number of selected component (if applicable): fop-0.95-0.2.beta1.noarch How reproducible: 100% Steps to Reproduce: 1.fop article.fo article.fop 2. 3. Actual results: collect backtrace Expected results: pdf Additional info:
Created attachment 306989 [details] stdout/stderr from the command
Created attachment 306990 [details] FOP file
Created attachment 306991 [details] One image file
Created attachment 306992 [details] Second image file
Created attachment 306993 [details] Second image file
yes I found out that attachment 306990 [details] is not valid XSL-FO, but it is said to work with fop based on Sun JRE.
So, just to be sure that input is correct, I have remade my set to be good XSL-FO to the best of my knowledge. I had a problem to be sure what actually is a valid XSL-FO, so I have settled on XML Scheme from http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop.xsd?view=co and I have fixed an example from http://www.cafeconleche.org/books/bible2/chapters/ch18.html#d1e4318 to be valid according to this scheme.
Created attachment 307088 [details] fop.xsd from the above mentioned apache.org URL
Created attachment 307089 [details] source XML document
Created attachment 307090 [details] XSLT stylesheet to generate FO file
Created attachment 307091 [details] generated xsl-fo file
Created attachment 307092 [details] stderr from fop -fo output.fo -pdf output.pdf
I don't know what's the deal with region-before stuff. The original example from cafeonleche.org had <fo:region-before .../> element before <fo:region-body/> and xmllint broke on this. No idea, how is wrong -- whether apache's .xsd or our fop.
What is the exact command you are running to reproduce this? All the attachments have been saved as text/plain, and I am not sure what they should really be.
attachment 307091 [details] is generated by xsltproc -o output.fo stylesheet.xsl testdoc.xml where output.fo is attachment 307091 [details] stylesheet.xsl is attachment 307090 [details] testdoc.xml is attachment 307089 [details] Checking of validity of XSL-FO file I used xmllint --schema fop.xsd --noout output.fo where fop.xsd is attachment 307088 [details] Generating of PDF I attempted with fop -fo output.fo -pdf output.pdf >output-log.txt 2>&1 where output-log.txt is attachment 307092 [details] Is this clear now? Sorry, for such a mess.
Yes thank you. I will look into it.
This isn't actually a problem with fop. The stylesheet is incorrect- for each flow-name must correspond to a region-name. The region's (region-body, region-after) should have a region-name property which is the same as the corresponding flow-name. xmllint didn't catch this because the file technically does not have incorrect xml, but it does not follow fop's rules. Closing.