You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/08/21 10:51:51 UTC

svn commit: r687657 - /xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml

Author: jeremias
Date: Thu Aug 21 01:51:50 2008
New Revision: 687657

URL: http://svn.apache.org/viewvc?rev=687657&view=rev
Log:
Added an FAQ entry about the element mismatch error message.

Modified:
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml

Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml?rev=687657&r1=687656&r2=687657&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml (original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml Thu Aug 21 01:51:50 2008
@@ -385,6 +385,47 @@
         </p>
       </answer>
     </faq>
+    <faq id="saxexception-mismatch">
+      <question>I get a SAXException: Mismatch: page-sequence vs. root
+        (or similar).</question>
+      <answer>
+        <p>
+          The full exception usually looks similar to this:
+        </p>
+        <source>Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root
+        (http://www.w3.org/1999/XSL/Format)</source>
+        <p>
+          This exception is usually a follow-up error after another exception. Sometimes
+          the original exception gets swallowed by Xalan's default <code>ErrorListener</code>
+          (should be fixed in the latest Xalan release).
+        </p>
+        <p>
+          The work-around is to set an explicit <code>ErrorListener</code> on the
+          <code>Transformer</code>. The <code>ErrorListener</code> can be as simple as this:
+        </p>
+        <source><![CDATA[
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.TransformerException;
+
+public class DefaultErrorListener implements ErrorListener {
+    
+    public void warning(TransformerException exc) {
+        System.err.println(exc.toString());
+    }
+
+    public void error(TransformerException exc)
+            throws TransformerException {
+        throw exc;
+    }
+
+    public void fatalError(TransformerException exc)
+            throws TransformerException {
+        throw exc;
+    }
+
+}]]></source>
+      </answer>
+    </faq>
   </part>
   <part id="part-output">
     <title>Problems with FOP output</title>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org