]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Throw a ValidationException if table-footer is put after table-body and the table...
authorVincent Hennebert <vhennebert@apache.org>
Thu, 13 Dec 2007 19:17:12 +0000 (19:17 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Thu, 13 Dec 2007 19:17:12 +0000 (19:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@603990 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/flow/table/Table.java

index 4933ab4dc94e2f1f4f8e79522a5042f5b1c7cf57..a915edf87bbe623ae1d5365fa9745078aa20a92f 100644 (file)
@@ -192,9 +192,17 @@ public class Table extends TableFObj implements ColumnNumberManagerHolder {
                     tooManyNodesError(loc, "table-footer");
                 } else {
                     tableFooterFound = true;
-                    if (tableBodyFound && getUserAgent().validateStrictly()) {
-                        nodesOutOfOrderError(loc, "fo:table-footer",
-                            "(table-body+)");
+                    if (tableBodyFound) {
+                        if (getUserAgent().validateStrictly()) {
+                            nodesOutOfOrderError(loc, "fo:table-footer", "(table-body+)");
+                        } else if (!isSeparateBorderModel()) {
+                            nodesOutOfOrderError(loc, "fo:table-footer", "(table-body+)."
+                                    + " This table uses the collapsing border"
+                                    + " model. In order to resolve borders in an efficient way"
+                                    + " the table-footer must be known before any table-body"
+                                    + " is parsed. Either put the footer at the correct place"
+                                    + " or switch to the separate border model");
+                        }
                     }
                 }
             } else if ("table-body".equals(localName)) {