Error when xsl file size is too large (+/- 850 lines) Convertion works fine till the size of the XSL file (not XML file) reach a certain value. Error : java.io.UTFDataFormatException: invalid byte 3 of 3-byte UTF-8 sequence Command line : call %FOP_DIR%\fop -xml %FAC_DIR%\XML\%1 -xsl %FAC_DIR%\xsl\e- Yel_Factures_DET_RES.xsl -pdf
Well, the error message clearly indicates this is an encoding problem and has absolutely nothing to do with the size of the XSL file or whatever. The most common cause that the editor saves the file ISO-8859-1 encoded while there wa no encoding declaration, causing the parser to assume UTF-8 encoding. I suspect there are a few french characters in the file. Delete the offending characters (in an XML comment) or replace them with XML character references (in normal content) or declare the proper encoding in the XML declaration.
Thanks, but your explanation is not correct, the problem has nothing to do (directly) with UTF8. My temporary solution is to split the xsl file into 2 files. And it works! The problem is that I must launch 2 processes to generate my PDF doc and the page numbering is not linked (of course). It's clearly a problem of space (memory process ??)
A workaround may be to do XSL transformation as a separate step. Step 1. Use Xalan to transform your XML through your XSL, to get an XML:FO formatted file. Step 2. Feed the resulting file to FOP to generate your PDF. (If step 1 fails, the problem is with your files).
Wonderfull Konstantin ! It solves the problem. I'm not sure, but could it be more quick than before (use of fop -XML, -XSL)? You know what ? I'm happy. Thanks.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed