Jeremias Maerki
Thu, 21 Aug 2008 00:17:32 -0700
On 20.08.2008 18:26:17 Andreas Delmelle wrote: > On Aug 20, 2008, at 16:56, Miguel Tablado wrote: > > Hi > > > I'm upgrading my FOP version from 0.20 up to 0.95 and I'm getting two > > problems. > > > > The first one, and most important, is that I can't generate > > barcodes with > > Apache FOP and Barcode4j projects. I don't know why but I'm getting > > this > > error: > > 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) > > > > I know that this error uses to be a follow-up error but I have no more > > detail and I'm lost since I have reached a strange situation. > > Just to be sure: Can you try using a different XSLT processor (or > simply a more recent version of Xalan)? Reason I'm asking is that I > seem to remember that some Xalan versions swallow exceptions. It > recovers, hands control back over to FOP, but the node in question > (where the error originates; if I judge correctly, the page-sequence > in question) will still not have been processed completely, so FOP > will have received a startElement(), but no endElement(). An alternative is to just set a simple ErrorListener implementation on the Transformer to override Xalan's default ErrorListener. I've attached one I've written once I've stumbled over this Xalan bug. > Not that this will immediately solve your issue, but if the XSLT > processor would terminate, then you should at least get a more > appropriate error-message. > > Another thing to try to receive a more meaningful error message: > - first generate the FO from the XML+XSLT (by means of the '-foout' > command-line option), and check if the FO is valid XML > - if the first step succeeds, then render the resulting FO to the > desired output format, preferably in debug-mode ('-d') to receive as > much relevant info as possible. > > If this doesn't help, don't hesitate to post back here! > > > HTH! > > Andreas Jeremias Maerki
DefaultErrorListener.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]