[org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format)]
javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2243)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2069)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1171)
at org.apache.xalan.transformer.TransformerImpl开发者_如何学JAVA.transform(TransformerImpl.java:634)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
at com.ca.calm.reporter.pdf.PDFGenerator.buildPdf(PDFGenerator.java:1132)
at com.ca.calm.reporter.pdf.PDFGenerator.generatePdf(PDFGenerator.java:848)
at com.ca.calm.reporter.pdf.PDFGenerator.exportReport(PDFGenerator.java:626)
at calmReporter.exportReport(calmReporter.java:521)
at calmReporter.handleRequest(calmReporter.java:161)
at com.ca.elm.common.sponsor.SponsorBase.Run(SponsorBase.java:159)
Caused by: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:335)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:307)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716)
... 12 more
I try to export a report to PDF which is in XML format with a column that has more than 100,000 characters. The export fails and I get a SAXException. We are using fop 0.95.
Please help me if you had encountered such problem.
This seems to be discusses in the FOP FAQ:
This exception is usually a follow-up error after another exception. Sometimes the original exception gets swallowed by Xalan's default
ErrorListener
(should be fixed in the latest Xalan release).
The work-around is to set an explicit ErrorListener
on the Transformer
.
More details can be found in the link above.
精彩评论