]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Merged revisions 690319,690324,690382,690532,690903 via svnmerge from
authorAdrian Cumiskey <acumiskey@apache.org>
Mon, 1 Sep 2008 10:06:57 +0000 (10:06 +0000)
committerAdrian Cumiskey <acumiskey@apache.org>
Mon, 1 Sep 2008 10:06:57 +0000 (10:06 +0000)
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk

........
  r690319 | jeremias | 2008-08-29 17:36:17 +0100 (Fri, 29 Aug 2008) | 1 line

  Added missing generation of areas for empty grid units in tables with collapsing border model.
........
  r690324 | jeremias | 2008-08-29 17:42:38 +0100 (Fri, 29 Aug 2008) | 1 line

  Added missing generation of areas for empty grid units in tables with collapsing border model. (missing test case)
........
  r690382 | adelmelle | 2008-08-29 21:12:34 +0100 (Fri, 29 Aug 2008) | 2 lines

  Bugzilla 45667: avoid NullPointerExceptions during hyphenation for empty inlines.
........
  r690532 | adelmelle | 2008-08-30 17:37:53 +0100 (Sat, 30 Aug 2008) | 1 line

  Partial fix for Bugzilla 45702: instead of wrapping the forcedBreakAfterLast element, simply add it to the returnList
........
  r690903 | jeremias | 2008-09-01 09:12:43 +0100 (Mon, 01 Sep 2008) | 1 line

  Avoid test failure if the backup directory is not available, yet.
........

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@690933 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/RowPainter.java
src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
status.xml
test/java/org/apache/fop/URIResolutionTestCase.java
test/layoutengine/hyphenation-testcases/empty-inline_hyphenation_bug45667.xml [new file with mode: 0644]
test/layoutengine/standard-testcases/page-number-citation-last_break-after_bug45702.xml [new file with mode: 0644]
test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_2.xml
test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_2_no-col.xml
test/layoutengine/standard-testcases/table_border-collapse_missing.xml [new file with mode: 0644]

index 8837b1a0f595f18dafaeeeb5eceb5d9bb30236ce..64b8bbc0d33c9f850e83c3bd045b338710975380 100644 (file)
@@ -406,7 +406,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
 
         if (forcedBreakAfterLast != null) {
             forcedBreakAfterLast.clearPendingMarks();
-            wrapPositionElement(forcedBreakAfterLast, returnList, false);
+            returnList.add(forcedBreakAfterLast);
         }
 
         context.updateKeepWithNextPending(getKeepWithNextStrength());
@@ -1043,7 +1043,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
         }
         return breakBefore;
     }
-    
+
     /**
      * Creates Knuth elements for break-after and adds them to the return list.
      * @param returnList return list to add the additional elements to
index a27fc6516380f6c761669d61c418cd9d3cd4bc81..963b98b376cdb27c96c911e415304d47d30ae463 100644 (file)
@@ -334,7 +334,8 @@ public abstract class InlineStackingLayoutManager extends AbstractLayoutManager
                     fromIndex = oldListIterator.previousIndex();
                 } else if (currLM == prevLM) {
                     bSomethingChanged
-                        = prevLM.applyChanges(oldList.subList(fromIndex, oldList.size()))
+                        = (prevLM != null)
+                            && prevLM.applyChanges(oldList.subList(fromIndex, oldList.size()))
                             || bSomethingChanged;
                 } else {
                     bSomethingChanged
index b2851c39f8e5d01f19abb1b2bbc619470c26c636..7e32fdd5e43651ea1a7bf930b08ffcfeaf075756 100644 (file)
@@ -27,13 +27,19 @@ import java.util.ListIterator;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.area.Block;
+import org.apache.fop.area.Trait;
 import org.apache.fop.fo.flow.table.ConditionalBorder;
 import org.apache.fop.fo.flow.table.EffRow;
+import org.apache.fop.fo.flow.table.EmptyGridUnit;
 import org.apache.fop.fo.flow.table.GridUnit;
 import org.apache.fop.fo.flow.table.PrimaryGridUnit;
+import org.apache.fop.fo.flow.table.Table;
+import org.apache.fop.fo.flow.table.TableColumn;
 import org.apache.fop.fo.flow.table.TablePart;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
+import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo;
 import org.apache.fop.layoutmgr.ElementListUtils;
 import org.apache.fop.layoutmgr.KnuthElement;
 import org.apache.fop.layoutmgr.KnuthPossPosIter;
@@ -202,10 +208,16 @@ class RowPainter {
         recordRowOffset(currentRow.getIndex(), currentRowOffset);
 
         // Need to compute the actual row height first
+        // and determine border behaviour for empty cells
+        boolean firstCellPart = true;
+        boolean lastCellPart = true;
         int actualRowHeight = 0;
         for (int i = 0; i < colCount; i++) {
             GridUnit currentGU = currentRow.getGridUnit(i);
-            if (!currentGU.isEmpty() && currentGU.getColSpanIndex() == 0
+            if (currentGU.isEmpty()) {
+                continue;
+            }
+            if (currentGU.getColSpanIndex() == 0
                     && (lastInPart || currentGU.isLastGridUnitRowSpan())
                     && firstCellParts[i] != null) {
                 // TODO
@@ -225,21 +237,53 @@ class RowPainter {
                 actualRowHeight = Math.max(actualRowHeight, cellOffset + cellHeight
                         - currentRowOffset);
             }
+
+            if (firstCellParts[i] != null && !firstCellParts[i].isFirstPart()) {
+                firstCellPart = false;
+            }
+            if (lastCellParts[i] != null && !lastCellParts[i].isLastPart()) {
+                lastCellPart = false;
+            }
         }
 
         // Then add areas for cells finishing on the current row
         for (int i = 0; i < colCount; i++) {
             GridUnit currentGU = currentRow.getGridUnit(i);
-            if (currentGU.isEmpty()) {
-                // TODO remove once missing cells are properly implemented (i.e., replaced
-                // by an fo:table-cell element containing an empty fo:block)
+            if (currentGU.isEmpty() && !tclm.isSeparateBorderModel()) {
+                int borderBeforeWhich;
+                if (firstCellPart) {
+                    if (firstCellOnPage[i]) {
+                        borderBeforeWhich = ConditionalBorder.LEADING_TRAILING;
+                    } else {
+                        borderBeforeWhich = ConditionalBorder.NORMAL;
+                    }
+                } else {
+                    borderBeforeWhich = ConditionalBorder.REST;
+                }
+                int borderAfterWhich;
+                if (lastCellPart) {
+                    if (lastInPart) {
+                        borderAfterWhich = ConditionalBorder.LEADING_TRAILING;
+                    } else {
+                        borderAfterWhich = ConditionalBorder.NORMAL;
+                    }
+                } else {
+                    borderAfterWhich = ConditionalBorder.REST;
+                }
+                addAreaForEmptyGridUnit((EmptyGridUnit)currentGU,
+                        currentRow.getIndex(), i,
+                        actualRowHeight,
+                        borderBeforeWhich, borderAfterWhich,
+                        lastOnPage);
+
                 firstCellOnPage[i] = false;
             } else if (currentGU.getColSpanIndex() == 0
                     && (lastInPart || currentGU.isLastGridUnitRowSpan())
                     && firstCellParts[i] != null) {
                 assert firstCellParts[i].pgu == currentGU.getPrimary();
+
                 int borderBeforeWhich;
-                if (firstCellParts[i].start == 0) {
+                if (firstCellParts[i].isFirstPart()) {
                     if (firstCellOnPage[i]) {
                         borderBeforeWhich = ConditionalBorder.LEADING_TRAILING;
                     } else {
@@ -259,6 +303,7 @@ class RowPainter {
                 } else {
                     borderAfterWhich = ConditionalBorder.REST;
                 }
+
                 addAreasForCell(firstCellParts[i].pgu,
                         firstCellParts[i].start, lastCellParts[i].end,
                         actualRowHeight, borderBeforeWhich, borderAfterWhich,
@@ -387,6 +432,56 @@ class RowPainter {
                 startRowIndex == firstRowOnPageIndex, lastOnPage, this, firstRowHeight);
     }
 
+    private void addAreaForEmptyGridUnit(EmptyGridUnit gu, int rowIndex, int colIndex,
+            int actualRowHeight,
+            int borderBeforeWhich, int borderAfterWhich, boolean lastOnPage) {
+
+        //get effective borders
+        BorderInfo borderBefore = gu.getBorderBefore(borderBeforeWhich);
+        BorderInfo borderAfter = gu.getBorderAfter(borderAfterWhich);
+        BorderInfo borderStart = gu.getBorderStart();
+        BorderInfo borderEnd = gu.getBorderEnd();
+        if (borderBefore.getRetainedWidth() == 0
+                && borderAfter.getRetainedWidth() == 0
+                && borderStart.getRetainedWidth() == 0
+                && borderEnd.getRetainedWidth() == 0) {
+            return; //no borders, no area necessary
+        }
+
+        TableLayoutManager tableLM = tclm.getTableLM();
+        Table table = tableLM.getTable();
+        TableColumn col = tclm.getColumns().getColumn(colIndex + 1);
+
+        //position information
+        boolean firstOnPage = (rowIndex == firstRowOnPageIndex);
+        boolean inFirstColumn = (colIndex == 0);
+        boolean inLastColumn = (colIndex == table.getNumberOfColumns() - 1);
+
+        //determine the block area's size
+        int ipd = col.getColumnWidth().getValue(tableLM);
+        ipd -= (borderStart.getRetainedWidth() + borderEnd.getRetainedWidth()) / 2;
+        int bpd = actualRowHeight;
+        bpd -= (borderBefore.getRetainedWidth() + borderAfter.getRetainedWidth()) / 2;
+
+        //generate the block area
+        Block block = new Block();
+        block.setPositioning(Block.ABSOLUTE);
+        block.addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
+        block.setIPD(ipd);
+        block.setBPD(bpd);
+        block.setXOffset(tclm.getXOffsetOfGridUnit(colIndex)
+                + (borderStart.getRetainedWidth() / 2));
+        block.setYOffset(getRowOffset(rowIndex)
+                - (borderBefore.getRetainedWidth() / 2));
+        boolean[] outer = new boolean[] {firstOnPage, lastOnPage, inFirstColumn,
+                inLastColumn};
+        TraitSetter.addCollapsingBorders(block,
+                borderBefore,
+                borderAfter,
+                borderStart,
+                borderEnd, outer);
+        tableLM.addChildArea(block);
+    }
 
     /**
      * Registers the given area, that will be used to render the part of
index ad8bec71554c26cdcd280c3ee1734870c4de6579..2ff97a6a7ef528a98a446817f5380220eda9fc90 100644 (file)
@@ -305,13 +305,21 @@ public class TableContentLayoutManager implements PercentBaseContext {
     }
 
     /**
-     * Retuns the X offset of the given grid unit.
+     * Returns the X offset of the given grid unit.
      * @param gu the grid unit
      * @return the requested X offset
      */
     protected int getXOffsetOfGridUnit(PrimaryGridUnit gu) {
-        int col = gu.getColIndex();
-        return startXOffset + getTableLM().getColumns().getXOffset(col + 1, getTableLM());
+        return getXOffsetOfGridUnit(gu.getColIndex());
+    }
+
+    /**
+     * Returns the X offset of the grid unit in the given column.
+     * @param colIndex the column index (zero-based)
+     * @return the requested X offset
+     */
+    protected int getXOffsetOfGridUnit(int colIndex) {
+        return startXOffset + getTableLM().getColumns().getXOffset(colIndex + 1, getTableLM());
     }
 
     /**
index 02edefb4e25b0b210cb4f5f34c19bc2bb96fd0fb..45ffdc71463be4e5e365f2a7fcaa0340e16e38ab 100644 (file)
 
   <changes>
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="AD" type="fix" fixes-bug="45667">
+        Quick-fix to avoid a possible NullPointerException when using
+        empty inlines and hyphenation.
+      </action>
+      <action context="Layout" dev="JM" type="add">
+        Added missing generation of areas for empty grid units in tables with collapsing border
+        model.
+      </action>
       <action context="Code" dev="JM" type="fix" importance="high">
         Fixed memory leak in property cache (not cleaning stale PropertyCache$CacheEntry instances).
       </action>
index 8b8b42ad6bb5e25df6ac41063c7e6d2ebec02c56..fd4f879dac0da16ff6a8e865e2275138c957414c 100644 (file)
@@ -66,6 +66,7 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
     /** @see junit.framework.TestCase#TestCase(String) */
     public URIResolutionTestCase(String name) {
         super(name);
+        backupDir.mkdirs();
     }
 
     /**
diff --git a/test/layoutengine/hyphenation-testcases/empty-inline_hyphenation_bug45667.xml b/test/layoutengine/hyphenation-testcases/empty-inline_hyphenation_bug45667.xml
new file mode 100644 (file)
index 0000000..c66b10d
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks for Bugzilla 45667: NPE thrown by an empty inline 
+      in combination with hyphenate="true".
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="LetterPage" page-width="6in"
+                                  page-height="3in">
+            <fo:region-body region-name="PageBody" margin="0.7in"
+                               background-color="rgb(245,245,245)"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="LetterPage" xml:lang="en-US" hyphenate="true">
+        <fo:flow flow-name="PageBody">
+            <fo:block font="12pt sans-serif">
+                <!-- the following line caused a NullPointerException, 
+                     if hyphenate="true" -->
+                <fo:inline id="document.general.efficiently.dictionary"/>
+                <!-- the following line is working fine -->
+                Some <fo:inline font-weight="bold" color="red">inline text</fo:inline> formatting.
+            </fo:block>
+          </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks /> <!-- only basic checks to see if no NPE occurred -->
+</testcase>
diff --git a/test/layoutengine/standard-testcases/page-number-citation-last_break-after_bug45702.xml b/test/layoutengine/standard-testcases/page-number-citation-last_break-after_bug45702.xml
new file mode 100644 (file)
index 0000000..1ca74f4
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+  Licensed to the Apache Software Foundation (ASF) under one or more\r
+  contributor license agreements.  See the NOTICE file distributed with\r
+  this work for additional information regarding copyright ownership.\r
+  The ASF licenses this file to You under the Apache License, Version 2.0\r
+  (the "License"); you may not use this file except in compliance with\r
+  the License.  You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+  <info>\r
+    <p>\r
+      This test checks for correct resolution of page-number-citation-last, in\r
+      case a break-after is set on the last child block to the block carrying the id.\r
+      (see also Bugzilla #45702)\r
+    </p>\r
+  </info>\r
+  <fo>\r
+  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">\r
+    <fo:layout-master-set>\r
+      <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">\r
+        <fo:region-body margin-top="0cm" region-name="xsl-region-body"/>\r
+      </fo:simple-page-master>\r
+    </fo:layout-master-set>\r
+    <fo:page-sequence master-reference="A4" id="toc">\r
+      <fo:flow flow-name="xsl-region-body">\r
+        <fo:block>\r
+          PS : from <fo:page-number-citation id="pnc.page-sequence" ref-id="page-sequence"/> to <fo:page-number-citation-last id="pncl.page-sequence" ref-id="page-sequence"/> \r
+        </fo:block>\r
+        <fo:block>\r
+          toc : from <fo:page-number-citation id="pnc.toc" ref-id="toc"/> to <fo:page-number-citation-last id="pncl.toc" ref-id="toc"/> \r
+        </fo:block>\r
+        <fo:block>\r
+          block-1 : from <fo:page-number-citation id="pnc.block-1" ref-id="block-1"/> to <fo:page-number-citation-last id="pncl.block-1" ref-id="block-1"/> \r
+        </fo:block>\r
+      </fo:flow>\r
+    </fo:page-sequence>\r
+    <fo:page-sequence master-reference="A4" id="page-sequence">\r
+      <fo:flow flow-name="xsl-region-body">\r
+        <fo:block id="block-1">\r
+          <fo:block padding="1pt">two blocks, with break-after specified on the last one</fo:block>\r
+            <fo:block break-before="page">XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX </fo:block>\r
+            <fo:block break-before="page" break-after="page">XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX \r
+            XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX </fo:block>\r
+        </fo:block>\r
+      </fo:flow>\r
+    </fo:page-sequence>\r
+  </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="1" xpath="/areaTree/pageSequence[1]//text[@prod-id='pnc.toc']/word" />\r
+    <eval expected="1" xpath="/areaTree/pageSequence[1]//text[@prod-id='pncl.toc']/word" />\r
+    <eval expected="2" xpath="/areaTree/pageSequence[1]//text[@prod-id='pnc.page-sequence']/word" />\r
+    <eval expected="4" xpath="/areaTree/pageSequence[1]//text[@prod-id='pncl.page-sequence']/word" />\r
+    <eval expected="2" xpath="/areaTree/pageSequence[1]//text[@prod-id='pnc.block-1']/word" />\r
+    <eval expected="4" xpath="/areaTree/pageSequence[1]//text[@prod-id='pncl.block-1']/word" />\r
+  </checks>\r
+</testcase>\r
index db25c81155cfa29b888be94e9da105c7854fa827..a4c575c616fb9435ccd94e6fd5f81d6ea7974f74 100644 (file)
     <eval expected="(double,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[19]/@border-after"/>
     <eval expected="(solid,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[19]/@border-start"/>
     <eval expected="(solid,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[19]/@border-end"/>
-    <!--
     <eval expected="94000" xpath="//flow/block[2]/block[20]/@ipd"/>
     <eval expected="106000" xpath="//flow/block[2]/block[20]/@ipda"/>
     <eval expected="52200" xpath="//flow/block[2]/block[20]/@bpd"/>
     <eval expected="52200" xpath="//flow/block[2]/block[20]/@bpda"/>
     <eval expected="103000" xpath="//flow/block[2]/block[20]/@left-offset"/>
     <eval expected="241100" xpath="//flow/block[2]/block[20]/@top-offset"/>
-    <eval expected="(double,#800000,0,collapse-outer)" xpath="//flow/block[2]/block[20]/@border-after"/>
+    <eval expected="" xpath="//flow/block[2]/block[20]/@border-before"/>
+    <eval expected="" xpath="//flow/block[2]/block[20]/@border-after"/>
     <eval expected="(solid,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[20]/@border-start"/>
     <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[20]/@border-end"/>
-    -->
-    <eval expected="97000" xpath="//flow/block[2]/block[20]/@ipd"/>
-    <eval expected="103000" xpath="//flow/block[2]/block[20]/@ipda"/>
-    <eval expected="41300" xpath="//flow/block[2]/block[20]/@bpd"/>
-    <eval expected="81300" xpath="//flow/block[2]/block[20]/@bpda"/>
-    <eval expected="203000" xpath="//flow/block[2]/block[20]/@left-offset"/>
-    <eval expected="115400" xpath="//flow/block[2]/block[20]/@top-offset"/>
-    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[20]/@border-before"/>
-    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[20]/@border-start"/>
-    <eval expected="97500" xpath="//flow/block[2]/block[21]/@ipd"/>
-    <eval expected="102500" xpath="//flow/block[2]/block[21]/@ipda"/>
+    <eval expected="97000" xpath="//flow/block[2]/block[21]/@ipd"/>
+    <eval expected="103000" xpath="//flow/block[2]/block[21]/@ipda"/>
     <eval expected="41300" xpath="//flow/block[2]/block[21]/@bpd"/>
     <eval expected="81300" xpath="//flow/block[2]/block[21]/@bpda"/>
-    <eval expected="300000" xpath="//flow/block[2]/block[21]/@left-offset"/>
+    <eval expected="203000" xpath="//flow/block[2]/block[21]/@left-offset"/>
     <eval expected="115400" xpath="//flow/block[2]/block[21]/@top-offset"/>
     <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[21]/@border-before"/>
-    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[21]/@border-end"/>
-    <eval expected="70000" xpath="//flow/block[2]/block[22]/@ipd"/>
-    <eval expected="130000" xpath="//flow/block[2]/block[22]/@ipda"/>
-    <eval expected="44400" xpath="//flow/block[2]/block[22]/@bpd"/>
-    <eval expected="44400" xpath="//flow/block[2]/block[22]/@bpda"/>
-    <eval expected="230000" xpath="//flow/block[2]/block[22]/@left-offset"/>
-    <eval expected="196700" xpath="//flow/block[2]/block[22]/@top-offset"/>
-    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[22]/@border-start"/>
-    <eval expected="97500" xpath="//flow/block[2]/block[23]/@ipd"/>
-    <eval expected="102500" xpath="//flow/block[2]/block[23]/@ipda"/>
+    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[21]/@border-start"/>
+    <eval expected="97500" xpath="//flow/block[2]/block[22]/@ipd"/>
+    <eval expected="102500" xpath="//flow/block[2]/block[22]/@ipda"/>
+    <eval expected="41300" xpath="//flow/block[2]/block[22]/@bpd"/>
+    <eval expected="81300" xpath="//flow/block[2]/block[22]/@bpda"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[22]/@left-offset"/>
+    <eval expected="115400" xpath="//flow/block[2]/block[22]/@top-offset"/>
+    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[22]/@border-before"/>
+    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[22]/@border-end"/>
+    <eval expected="70000" xpath="//flow/block[2]/block[23]/@ipd"/>
+    <eval expected="130000" xpath="//flow/block[2]/block[23]/@ipda"/>
     <eval expected="44400" xpath="//flow/block[2]/block[23]/@bpd"/>
     <eval expected="44400" xpath="//flow/block[2]/block[23]/@bpda"/>
-    <eval expected="300000" xpath="//flow/block[2]/block[23]/@left-offset"/>
+    <eval expected="230000" xpath="//flow/block[2]/block[23]/@left-offset"/>
     <eval expected="196700" xpath="//flow/block[2]/block[23]/@top-offset"/>
-    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[23]/@border-end"/>
-    <eval expected="97000" xpath="//flow/block[2]/block[24]/@ipd"/>
-    <eval expected="103000" xpath="//flow/block[2]/block[24]/@ipda"/>
-    <eval expected="49700" xpath="//flow/block[2]/block[24]/@bpd"/>
-    <eval expected="54700" xpath="//flow/block[2]/block[24]/@bpda"/>
-    <eval expected="203000" xpath="//flow/block[2]/block[24]/@left-offset"/>
-    <eval expected="241100" xpath="//flow/block[2]/block[24]/@top-offset"/>
-    <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[24]/@border-after"/>
-    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[24]/@border-start"/>
-    <eval expected="97500" xpath="//flow/block[2]/block[25]/@ipd"/>
-    <eval expected="102500" xpath="//flow/block[2]/block[25]/@ipda"/>
+    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[23]/@border-start"/>
+    <eval expected="97500" xpath="//flow/block[2]/block[24]/@ipd"/>
+    <eval expected="102500" xpath="//flow/block[2]/block[24]/@ipda"/>
+    <eval expected="44400" xpath="//flow/block[2]/block[24]/@bpd"/>
+    <eval expected="44400" xpath="//flow/block[2]/block[24]/@bpda"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[24]/@left-offset"/>
+    <eval expected="196700" xpath="//flow/block[2]/block[24]/@top-offset"/>
+    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[24]/@border-end"/>
+    <eval expected="97000" xpath="//flow/block[2]/block[25]/@ipd"/>
+    <eval expected="103000" xpath="//flow/block[2]/block[25]/@ipda"/>
     <eval expected="49700" xpath="//flow/block[2]/block[25]/@bpd"/>
     <eval expected="54700" xpath="//flow/block[2]/block[25]/@bpda"/>
-    <eval expected="300000" xpath="//flow/block[2]/block[25]/@left-offset"/>
+    <eval expected="203000" xpath="//flow/block[2]/block[25]/@left-offset"/>
     <eval expected="241100" xpath="//flow/block[2]/block[25]/@top-offset"/>
     <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[25]/@border-after"/>
-    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[25]/@border-end"/>
-    <eval expected="167500" xpath="//flow/block[2]/block[26]/@ipd"/>
-    <eval expected="167500" xpath="//flow/block[2]/block[26]/@ipda"/>
-    <eval expected="135400" xpath="//flow/block[2]/block[26]/@bpd"/>
-    <eval expected="135400" xpath="//flow/block[2]/block[26]/@bpda"/>
-    <eval expected="230000" xpath="//flow/block[2]/block[26]/@left-offset"/>
-    <eval expected="155400" xpath="//flow/block[2]/block[26]/@top-offset"/>
+    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[25]/@border-start"/>
+    <eval expected="97500" xpath="//flow/block[2]/block[26]/@ipd"/>
+    <eval expected="102500" xpath="//flow/block[2]/block[26]/@ipda"/>
+    <eval expected="49700" xpath="//flow/block[2]/block[26]/@bpd"/>
+    <eval expected="54700" xpath="//flow/block[2]/block[26]/@bpda"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[26]/@left-offset"/>
+    <eval expected="241100" xpath="//flow/block[2]/block[26]/@top-offset"/>
+    <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[26]/@border-after"/>
+    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[26]/@border-end"/>
+    <eval expected="167500" xpath="//flow/block[2]/block[27]/@ipd"/>
+    <eval expected="167500" xpath="//flow/block[2]/block[27]/@ipda"/>
+    <eval expected="135400" xpath="//flow/block[2]/block[27]/@bpd"/>
+    <eval expected="135400" xpath="//flow/block[2]/block[27]/@bpda"/>
+    <eval expected="230000" xpath="//flow/block[2]/block[27]/@left-offset"/>
+    <eval expected="155400" xpath="//flow/block[2]/block[27]/@top-offset"/>
 
     <!-- table 2 -->
     <eval expected="199300" xpath="//flow/block[4]/@bpd"/>
index 82c82e0c515b3bc1b5b7ec366e99b43f9edf1b31..97587ccde1f015bab4045d2a204fdb02538631bc 100644 (file)
     <eval expected="(solid,#c0c0c0,6000,collapse-outer)" xpath="//flow/block[2]/block[2]/@border-before"/>
     <eval expected="(solid,#c0c0c0,6000,collapse-inner)" xpath="//flow/block[2]/block[2]/@border-start"/>
     <eval expected="(solid,#c0c0c0,6000,collapse-inner)" xpath="//flow/block[2]/block[2]/@border-end"/>
-    <eval expected="92000" xpath="//flow/block[2]/block[3]/@ipd"/>
-    <eval expected="108000" xpath="//flow/block[2]/block[3]/@ipda"/>
-    <eval expected="43200" xpath="//flow/block[2]/block[3]/@bpd"/>
-    <eval expected="61200" xpath="//flow/block[2]/block[3]/@bpda"/>
-    <eval expected="3000" xpath="//flow/block[2]/block[3]/@left-offset"/>
-    <eval expected="16400" xpath="//flow/block[2]/block[3]/@top-offset"/>
-    <eval expected="(solid,#800000,12000,collapse-inner)" xpath="//flow/block[2]/block[3]/@border-before"/>
-    <eval expected="(double,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[3]/@border-after"/>
-    <eval expected="(solid,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[3]/@border-start"/>
-    <eval expected="(dashed,#ff0000,10000,collapse-inner)" xpath="//flow/block[2]/block[3]/@border-end"/>
-    <eval expected="80000" xpath="//flow/block[2]/block[4]/@ipd"/>
-    <eval expected="120000" xpath="//flow/block[2]/block[4]/@ipda"/>
-    <eval expected="30900" xpath="//flow/block[2]/block[4]/@bpd"/>
-    <eval expected="42900" xpath="//flow/block[2]/block[4]/@bpda"/>
-    <eval expected="15000" xpath="//flow/block[2]/block[4]/@left-offset"/>
-    <eval expected="71600" xpath="//flow/block[2]/block[4]/@top-offset"/>
-    <eval expected="(double,#ff00ff,6000,collapse-inner)" xpath="//flow/block[2]/block[4]/@border-before"/>
-    <eval expected="(inset,#ff00ff,6000,collapse-inner)" xpath="//flow/block[2]/block[4]/@border-after"/>
-    <eval expected="(solid,#ff00ff,30000,collapse-outer)" xpath="//flow/block[2]/block[4]/@border-start"/>
+    <!-- block[3] is an empty cell -->
+    <eval expected="92000" xpath="//flow/block[2]/block[4]/@ipd"/>
+    <eval expected="108000" xpath="//flow/block[2]/block[4]/@ipda"/>
+    <eval expected="43200" xpath="//flow/block[2]/block[4]/@bpd"/>
+    <eval expected="61200" xpath="//flow/block[2]/block[4]/@bpda"/>
+    <eval expected="3000" xpath="//flow/block[2]/block[4]/@left-offset"/>
+    <eval expected="16400" xpath="//flow/block[2]/block[4]/@top-offset"/>
+    <eval expected="(solid,#800000,12000,collapse-inner)" xpath="//flow/block[2]/block[4]/@border-before"/>
+    <eval expected="(double,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[4]/@border-after"/>
+    <eval expected="(solid,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[4]/@border-start"/>
     <eval expected="(dashed,#ff0000,10000,collapse-inner)" xpath="//flow/block[2]/block[4]/@border-end"/>
-    <eval expected="95000" xpath="//flow/block[2]/block[5]/@ipd"/>
-    <eval expected="105000" xpath="//flow/block[2]/block[5]/@ipda"/>
-    <eval expected="52200" xpath="//flow/block[2]/block[5]/@bpd"/>
-    <eval expected="52200" xpath="//flow/block[2]/block[5]/@bpda"/>
-    <eval expected="105000" xpath="//flow/block[2]/block[5]/@left-offset"/>
-    <eval expected="22400" xpath="//flow/block[2]/block[5]/@top-offset"/>
-    <eval expected="(dashed,#ff0000,10000,collapse-inner)" xpath="//flow/block[2]/block[5]/@border-start"/>
-    <eval expected="98000" xpath="//flow/block[2]/block[6]/@ipd"/>
-    <eval expected="102000" xpath="//flow/block[2]/block[6]/@ipda"/>
-    <eval expected="50200" xpath="//flow/block[2]/block[6]/@bpd"/>
-    <eval expected="54200" xpath="//flow/block[2]/block[6]/@bpda"/>
-    <eval expected="200000" xpath="//flow/block[2]/block[6]/@left-offset"/>
-    <eval expected="20400" xpath="//flow/block[2]/block[6]/@top-offset"/>
-    <eval expected="(solid,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[6]/@border-before"/>
-    <eval expected="(double,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[6]/@border-end"/>
+    <!-- block[5] is an empty cell -->
+    <!-- 3.1: -->
+    <eval expected="80000" xpath="//flow/block[2]/block[6]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[2]/block[6]/@ipda"/>
+    <eval expected="30900" xpath="//flow/block[2]/block[6]/@bpd"/>
+    <eval expected="42900" xpath="//flow/block[2]/block[6]/@bpda"/>
+    <eval expected="15000" xpath="//flow/block[2]/block[6]/@left-offset"/>
+    <eval expected="71600" xpath="//flow/block[2]/block[6]/@top-offset"/>
+    <eval expected="(double,#ff00ff,6000,collapse-inner)" xpath="//flow/block[2]/block[6]/@border-before"/>
+    <eval expected="(inset,#ff00ff,6000,collapse-inner)" xpath="//flow/block[2]/block[6]/@border-after"/>
+    <eval expected="(solid,#ff00ff,30000,collapse-outer)" xpath="//flow/block[2]/block[6]/@border-start"/>
+    <eval expected="(dashed,#ff0000,10000,collapse-inner)" xpath="//flow/block[2]/block[6]/@border-end"/>
+    <!-- 4x border-only cells for 2.2: -->
     <eval expected="95000" xpath="//flow/block[2]/block[7]/@ipd"/>
     <eval expected="105000" xpath="//flow/block[2]/block[7]/@ipda"/>
-    <eval expected="34400" xpath="//flow/block[2]/block[7]/@bpd"/>
-    <eval expected="39400" xpath="//flow/block[2]/block[7]/@bpda"/>
+    <eval expected="52200" xpath="//flow/block[2]/block[7]/@bpd"/>
+    <eval expected="52200" xpath="//flow/block[2]/block[7]/@bpda"/>
     <eval expected="105000" xpath="//flow/block[2]/block[7]/@left-offset"/>
-    <eval expected="74600" xpath="//flow/block[2]/block[7]/@top-offset"/>
-    <eval expected="(outset,#c0c0c0,5000,collapse-inner)" xpath="//flow/block[2]/block[7]/@border-after"/>
+    <eval expected="22400" xpath="//flow/block[2]/block[7]/@top-offset"/>
     <eval expected="(dashed,#ff0000,10000,collapse-inner)" xpath="//flow/block[2]/block[7]/@border-start"/>
     <eval expected="98000" xpath="//flow/block[2]/block[8]/@ipd"/>
     <eval expected="102000" xpath="//flow/block[2]/block[8]/@ipda"/>
-    <eval expected="16900" xpath="//flow/block[2]/block[8]/@bpd"/>
-    <eval expected="56900" xpath="//flow/block[2]/block[8]/@bpda"/>
+    <eval expected="50200" xpath="//flow/block[2]/block[8]/@bpd"/>
+    <eval expected="54200" xpath="//flow/block[2]/block[8]/@bpda"/>
     <eval expected="200000" xpath="//flow/block[2]/block[8]/@left-offset"/>
-    <eval expected="74600" xpath="//flow/block[2]/block[8]/@top-offset"/>
-    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[8]/@border-after"/>
+    <eval expected="20400" xpath="//flow/block[2]/block[8]/@top-offset"/>
+    <eval expected="(solid,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[8]/@border-before"/>
     <eval expected="(double,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[8]/@border-end"/>
-    <eval expected="193000" xpath="//flow/block[2]/block[9]/@ipd"/>
-    <eval expected="193000" xpath="//flow/block[2]/block[9]/@ipda"/>
-    <eval expected="67100" xpath="//flow/block[2]/block[9]/@bpd"/>
-    <eval expected="67100" xpath="//flow/block[2]/block[9]/@bpda"/>
+    <eval expected="95000" xpath="//flow/block[2]/block[9]/@ipd"/>
+    <eval expected="105000" xpath="//flow/block[2]/block[9]/@ipda"/>
+    <eval expected="34400" xpath="//flow/block[2]/block[9]/@bpd"/>
+    <eval expected="39400" xpath="//flow/block[2]/block[9]/@bpda"/>
     <eval expected="105000" xpath="//flow/block[2]/block[9]/@left-offset"/>
-    <eval expected="24400" xpath="//flow/block[2]/block[9]/@top-offset"/>
+    <eval expected="74600" xpath="//flow/block[2]/block[9]/@top-offset"/>
+    <eval expected="(outset,#c0c0c0,5000,collapse-inner)" xpath="//flow/block[2]/block[9]/@border-after"/>
+    <eval expected="(dashed,#ff0000,10000,collapse-inner)" xpath="//flow/block[2]/block[9]/@border-start"/>
     <eval expected="98000" xpath="//flow/block[2]/block[10]/@ipd"/>
     <eval expected="102000" xpath="//flow/block[2]/block[10]/@ipda"/>
-    <eval expected="14400" xpath="//flow/block[2]/block[10]/@bpd"/>
-    <eval expected="59400" xpath="//flow/block[2]/block[10]/@bpda"/>
-    <eval expected="302000" xpath="//flow/block[2]/block[10]/@left-offset"/>
-    <eval expected="72100" xpath="//flow/block[2]/block[10]/@top-offset"/>
-    <eval expected="(ridge,#800000,5000,collapse-inner)" xpath="//flow/block[2]/block[10]/@border-before"/>
+    <eval expected="16900" xpath="//flow/block[2]/block[10]/@bpd"/>
+    <eval expected="56900" xpath="//flow/block[2]/block[10]/@bpda"/>
+    <eval expected="200000" xpath="//flow/block[2]/block[10]/@left-offset"/>
+    <eval expected="74600" xpath="//flow/block[2]/block[10]/@top-offset"/>
     <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[10]/@border-after"/>
-    <eval expected="(double,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[10]/@border-start"/>
-    <eval expected="78000" xpath="//flow/block[2]/block[11]/@ipd"/>
-    <eval expected="122000" xpath="//flow/block[2]/block[11]/@ipda"/>
-    <eval expected="56300" xpath="//flow/block[2]/block[11]/@bpd"/>
-    <eval expected="66300" xpath="//flow/block[2]/block[11]/@bpda"/>
-    <eval expected="2000" xpath="//flow/block[2]/block[11]/@left-offset"/>
-    <eval expected="108500" xpath="//flow/block[2]/block[11]/@top-offset"/>
-    <eval expected="(inset,#000000,6000,collapse-inner)" xpath="//flow/block[2]/block[11]/@border-before"/>
-    <eval expected="(solid,#000000,4000,collapse-inner)" xpath="//flow/block[2]/block[11]/@border-after"/>
-    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//flow/block[2]/block[11]/@border-start"/>
-    <eval expected="(solid,#000000,40000,collapse-inner)" xpath="//flow/block[2]/block[11]/@border-end"/>
-    <eval expected="77000" xpath="//flow/block[2]/block[12]/@ipd"/>
-    <eval expected="123000" xpath="//flow/block[2]/block[12]/@ipda"/>
-    <eval expected="28800" xpath="//flow/block[2]/block[12]/@bpd"/>
-    <eval expected="93800" xpath="//flow/block[2]/block[12]/@bpda"/>
-    <eval expected="120000" xpath="//flow/block[2]/block[12]/@left-offset"/>
-    <eval expected="109000" xpath="//flow/block[2]/block[12]/@top-offset"/>
-    <eval expected="(outset,#c0c0c0,5000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-before"/>
-    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-after"/>
-    <eval expected="(solid,#000000,40000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-start"/>
-    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-end"/>
-    <eval expected="95000" xpath="//flow/block[2]/block[13]/@ipd"/>
-    <eval expected="105000" xpath="//flow/block[2]/block[13]/@ipda"/>
-    <eval expected="36400" xpath="//flow/block[2]/block[13]/@bpd"/>
-    <eval expected="52400" xpath="//flow/block[2]/block[13]/@bpda"/>
+    <eval expected="(double,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[10]/@border-end"/>
+    <eval expected="193000" xpath="//flow/block[2]/block[11]/@ipd"/>
+    <eval expected="193000" xpath="//flow/block[2]/block[11]/@ipda"/>
+    <eval expected="67100" xpath="//flow/block[2]/block[11]/@bpd"/>
+    <eval expected="67100" xpath="//flow/block[2]/block[11]/@bpda"/>
+    <eval expected="105000" xpath="//flow/block[2]/block[11]/@left-offset"/>
+    <eval expected="24400" xpath="//flow/block[2]/block[11]/@top-offset"/>
+    <eval expected="98000" xpath="//flow/block[2]/block[12]/@ipd"/>
+    <eval expected="102000" xpath="//flow/block[2]/block[12]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[12]/@bpd"/>
+    <eval expected="59400" xpath="//flow/block[2]/block[12]/@bpda"/>
+    <eval expected="302000" xpath="//flow/block[2]/block[12]/@left-offset"/>
+    <eval expected="72100" xpath="//flow/block[2]/block[12]/@top-offset"/>
+    <eval expected="(ridge,#800000,5000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-before"/>
+    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-after"/>
+    <eval expected="(double,#ff0000,4000,collapse-inner)" xpath="//flow/block[2]/block[12]/@border-start"/>
+    <eval expected="78000" xpath="//flow/block[2]/block[13]/@ipd"/>
+    <eval expected="122000" xpath="//flow/block[2]/block[13]/@ipda"/>
+    <eval expected="56300" xpath="//flow/block[2]/block[13]/@bpd"/>
+    <eval expected="66300" xpath="//flow/block[2]/block[13]/@bpda"/>
     <eval expected="2000" xpath="//flow/block[2]/block[13]/@left-offset"/>
-    <eval expected="170800" xpath="//flow/block[2]/block[13]/@top-offset"/>
-    <eval expected="(solid,#000000,4000,collapse-inner)" xpath="//flow/block[2]/block[13]/@border-before"/>
-    <eval expected="(solid,#800000,12000,collapse-inner)" xpath="//flow/block[2]/block[13]/@border-after"/>
+    <eval expected="108500" xpath="//flow/block[2]/block[13]/@top-offset"/>
+    <eval expected="(inset,#000000,6000,collapse-inner)" xpath="//flow/block[2]/block[13]/@border-before"/>
+    <eval expected="(solid,#000000,4000,collapse-inner)" xpath="//flow/block[2]/block[13]/@border-after"/>
     <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//flow/block[2]/block[13]/@border-start"/>
-    <eval expected="(solid,#c0c0c0,6000,collapse-inner)" xpath="//flow/block[2]/block[13]/@border-end"/>
-    <eval expected="67000" xpath="//flow/block[2]/block[14]/@ipd"/>
-    <eval expected="133000" xpath="//flow/block[2]/block[14]/@ipda"/>
-    <eval expected="14400" xpath="//flow/block[2]/block[14]/@bpd"/>
-    <eval expected="74400" xpath="//flow/block[2]/block[14]/@bpda"/>
-    <eval expected="103000" xpath="//flow/block[2]/block[14]/@left-offset"/>
-    <eval expected="142800" xpath="//flow/block[2]/block[14]/@top-offset"/>
-    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-before"/>
-    <eval expected="(solid,#c0c0c0,6000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-start"/>
-    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-end"/>
-    <eval expected="94000" xpath="//flow/block[2]/block[15]/@ipd"/>
-    <eval expected="106000" xpath="//flow/block[2]/block[15]/@ipda"/>
-    <eval expected="43200" xpath="//flow/block[2]/block[15]/@bpd"/>
-    <eval expected="61200" xpath="//flow/block[2]/block[15]/@bpda"/>
-    <eval expected="3000" xpath="//flow/block[2]/block[15]/@left-offset"/>
-    <eval expected="211200" xpath="//flow/block[2]/block[15]/@top-offset"/>
-    <eval expected="(solid,#800000,12000,collapse-inner)" xpath="//flow/block[2]/block[15]/@border-before"/>
-    <eval expected="(double,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[15]/@border-after"/>
-    <eval expected="(solid,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[15]/@border-start"/>
-    <eval expected="(solid,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[15]/@border-end"/>
-    <!--
-    <eval expected="94000" xpath="//flow/block[2]/block[16]/@ipd"/>
-    <eval expected="106000" xpath="//flow/block[2]/block[16]/@ipda"/>
-    <eval expected="52200" xpath="//flow/block[2]/block[16]/@bpd"/>
-    <eval expected="52200" xpath="//flow/block[2]/block[16]/@bpda"/>
+    <eval expected="(solid,#000000,40000,collapse-inner)" xpath="//flow/block[2]/block[13]/@border-end"/>
+    <eval expected="77000" xpath="//flow/block[2]/block[14]/@ipd"/>
+    <eval expected="123000" xpath="//flow/block[2]/block[14]/@ipda"/>
+    <eval expected="28800" xpath="//flow/block[2]/block[14]/@bpd"/>
+    <eval expected="93800" xpath="//flow/block[2]/block[14]/@bpda"/>
+    <eval expected="120000" xpath="//flow/block[2]/block[14]/@left-offset"/>
+    <eval expected="109000" xpath="//flow/block[2]/block[14]/@top-offset"/>
+    <eval expected="(outset,#c0c0c0,5000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-before"/>
+    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-after"/>
+    <eval expected="(solid,#000000,40000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-start"/>
+    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[14]/@border-end"/>
+    <eval expected="95000" xpath="//flow/block[2]/block[15]/@ipd"/>
+    <eval expected="105000" xpath="//flow/block[2]/block[15]/@ipda"/>
+    <eval expected="36400" xpath="//flow/block[2]/block[15]/@bpd"/>
+    <eval expected="52400" xpath="//flow/block[2]/block[15]/@bpda"/>
+    <eval expected="2000" xpath="//flow/block[2]/block[15]/@left-offset"/>
+    <eval expected="170800" xpath="//flow/block[2]/block[15]/@top-offset"/>
+    <eval expected="(solid,#000000,4000,collapse-inner)" xpath="//flow/block[2]/block[15]/@border-before"/>
+    <eval expected="(solid,#800000,12000,collapse-inner)" xpath="//flow/block[2]/block[15]/@border-after"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//flow/block[2]/block[15]/@border-start"/>
+    <eval expected="(solid,#c0c0c0,6000,collapse-inner)" xpath="//flow/block[2]/block[15]/@border-end"/>
+    <eval expected="67000" xpath="//flow/block[2]/block[16]/@ipd"/>
+    <eval expected="133000" xpath="//flow/block[2]/block[16]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[16]/@bpd"/>
+    <eval expected="74400" xpath="//flow/block[2]/block[16]/@bpda"/>
     <eval expected="103000" xpath="//flow/block[2]/block[16]/@left-offset"/>
-    <eval expected="217200" xpath="//flow/block[2]/block[16]/@top-offset"/>
-    <eval expected="(double,#800000,0,collapse-outer)" xpath="//flow/block[2]/block[16]/@border-after"/>
-    <eval expected="(solid,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-start"/>
-    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-end"/>
-    -->
-    <eval expected="97000" xpath="//flow/block[2]/block[16]/@ipd"/>
-    <eval expected="103000" xpath="//flow/block[2]/block[16]/@ipda"/>
-    <eval expected="41300" xpath="//flow/block[2]/block[16]/@bpd"/>
-    <eval expected="81300" xpath="//flow/block[2]/block[16]/@bpda"/>
-    <eval expected="203000" xpath="//flow/block[2]/block[16]/@left-offset"/>
-    <eval expected="91500" xpath="//flow/block[2]/block[16]/@top-offset"/>
-    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-before"/>
-    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-start"/>
-    <eval expected="97500" xpath="//flow/block[2]/block[17]/@ipd"/>
-    <eval expected="102500" xpath="//flow/block[2]/block[17]/@ipda"/>
-    <eval expected="41300" xpath="//flow/block[2]/block[17]/@bpd"/>
-    <eval expected="81300" xpath="//flow/block[2]/block[17]/@bpda"/>
-    <eval expected="300000" xpath="//flow/block[2]/block[17]/@left-offset"/>
-    <eval expected="91500" xpath="//flow/block[2]/block[17]/@top-offset"/>
-    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[17]/@border-before"/>
-    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[17]/@border-end"/>
-    <eval expected="70000" xpath="//flow/block[2]/block[18]/@ipd"/>
-    <eval expected="130000" xpath="//flow/block[2]/block[18]/@ipda"/>
-    <eval expected="44400" xpath="//flow/block[2]/block[18]/@bpd"/>
-    <eval expected="44400" xpath="//flow/block[2]/block[18]/@bpda"/>
-    <eval expected="230000" xpath="//flow/block[2]/block[18]/@left-offset"/>
-    <eval expected="172800" xpath="//flow/block[2]/block[18]/@top-offset"/>
-    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[18]/@border-start"/>
-    <eval expected="97500" xpath="//flow/block[2]/block[19]/@ipd"/>
-    <eval expected="102500" xpath="//flow/block[2]/block[19]/@ipda"/>
-    <eval expected="44400" xpath="//flow/block[2]/block[19]/@bpd"/>
-    <eval expected="44400" xpath="//flow/block[2]/block[19]/@bpda"/>
-    <eval expected="300000" xpath="//flow/block[2]/block[19]/@left-offset"/>
-    <eval expected="172800" xpath="//flow/block[2]/block[19]/@top-offset"/>
-    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[19]/@border-end"/>
-    <eval expected="97000" xpath="//flow/block[2]/block[20]/@ipd"/>
-    <eval expected="103000" xpath="//flow/block[2]/block[20]/@ipda"/>
-    <eval expected="49700" xpath="//flow/block[2]/block[20]/@bpd"/>
-    <eval expected="54700" xpath="//flow/block[2]/block[20]/@bpda"/>
-    <eval expected="203000" xpath="//flow/block[2]/block[20]/@left-offset"/>
-    <eval expected="217200" xpath="//flow/block[2]/block[20]/@top-offset"/>
-    <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[20]/@border-after"/>
-    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[20]/@border-start"/>
-    <eval expected="97500" xpath="//flow/block[2]/block[21]/@ipd"/>
-    <eval expected="102500" xpath="//flow/block[2]/block[21]/@ipda"/>
-    <eval expected="49700" xpath="//flow/block[2]/block[21]/@bpd"/>
-    <eval expected="54700" xpath="//flow/block[2]/block[21]/@bpda"/>
-    <eval expected="300000" xpath="//flow/block[2]/block[21]/@left-offset"/>
-    <eval expected="217200" xpath="//flow/block[2]/block[21]/@top-offset"/>
-    <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[21]/@border-after"/>
-    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[21]/@border-end"/>
-    <eval expected="167500" xpath="//flow/block[2]/block[22]/@ipd"/>
-    <eval expected="167500" xpath="//flow/block[2]/block[22]/@ipda"/>
-    <eval expected="135400" xpath="//flow/block[2]/block[22]/@bpd"/>
-    <eval expected="135400" xpath="//flow/block[2]/block[22]/@bpda"/>
-    <eval expected="230000" xpath="//flow/block[2]/block[22]/@left-offset"/>
-    <eval expected="131500" xpath="//flow/block[2]/block[22]/@top-offset"/>
+    <eval expected="142800" xpath="//flow/block[2]/block[16]/@top-offset"/>
+    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-before"/>
+    <eval expected="(solid,#c0c0c0,6000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-start"/>
+    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[16]/@border-end"/>
+    <eval expected="94000" xpath="//flow/block[2]/block[17]/@ipd"/>
+    <eval expected="106000" xpath="//flow/block[2]/block[17]/@ipda"/>
+    <eval expected="43200" xpath="//flow/block[2]/block[17]/@bpd"/>
+    <eval expected="61200" xpath="//flow/block[2]/block[17]/@bpda"/>
+    <eval expected="3000" xpath="//flow/block[2]/block[17]/@left-offset"/>
+    <eval expected="211200" xpath="//flow/block[2]/block[17]/@top-offset"/>
+    <eval expected="(solid,#800000,12000,collapse-inner)" xpath="//flow/block[2]/block[17]/@border-before"/>
+    <eval expected="(double,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[17]/@border-after"/>
+    <eval expected="(solid,#800000,6000,collapse-outer)" xpath="//flow/block[2]/block[17]/@border-start"/>
+    <eval expected="(solid,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[17]/@border-end"/>
+    <eval expected="94000" xpath="//flow/block[2]/block[18]/@ipd"/>
+    <eval expected="106000" xpath="//flow/block[2]/block[18]/@ipda"/>
+    <eval expected="52200" xpath="//flow/block[2]/block[18]/@bpd"/>
+    <eval expected="52200" xpath="//flow/block[2]/block[18]/@bpda"/>
+    <eval expected="103000" xpath="//flow/block[2]/block[18]/@left-offset"/>
+    <eval expected="217200" xpath="//flow/block[2]/block[18]/@top-offset"/>
+    <eval expected="" xpath="//flow/block[2]/block[18]/@border-after"/>
+    <eval expected="(solid,#800000,6000,collapse-inner)" xpath="//flow/block[2]/block[18]/@border-start"/>
+    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[18]/@border-end"/>
+    <eval expected="97000" xpath="//flow/block[2]/block[19]/@ipd"/>
+    <eval expected="103000" xpath="//flow/block[2]/block[19]/@ipda"/>
+    <eval expected="41300" xpath="//flow/block[2]/block[19]/@bpd"/>
+    <eval expected="81300" xpath="//flow/block[2]/block[19]/@bpda"/>
+    <eval expected="203000" xpath="//flow/block[2]/block[19]/@left-offset"/>
+    <eval expected="91500" xpath="//flow/block[2]/block[19]/@top-offset"/>
+    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[19]/@border-before"/>
+    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[19]/@border-start"/>
+    <eval expected="97500" xpath="//flow/block[2]/block[20]/@ipd"/>
+    <eval expected="102500" xpath="//flow/block[2]/block[20]/@ipda"/>
+    <eval expected="41300" xpath="//flow/block[2]/block[20]/@bpd"/>
+    <eval expected="81300" xpath="//flow/block[2]/block[20]/@bpda"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[20]/@left-offset"/>
+    <eval expected="91500" xpath="//flow/block[2]/block[20]/@top-offset"/>
+    <eval expected="(double,#008000,40000,collapse-inner)" xpath="//flow/block[2]/block[20]/@border-before"/>
+    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[20]/@border-end"/>
+    <eval expected="70000" xpath="//flow/block[2]/block[21]/@ipd"/>
+    <eval expected="130000" xpath="//flow/block[2]/block[21]/@ipda"/>
+    <eval expected="44400" xpath="//flow/block[2]/block[21]/@bpd"/>
+    <eval expected="44400" xpath="//flow/block[2]/block[21]/@bpda"/>
+    <eval expected="230000" xpath="//flow/block[2]/block[21]/@left-offset"/>
+    <eval expected="172800" xpath="//flow/block[2]/block[21]/@top-offset"/>
+    <eval expected="(solid,#c0c0c0,60000,collapse-inner)" xpath="//flow/block[2]/block[21]/@border-start"/>
+    <eval expected="97500" xpath="//flow/block[2]/block[22]/@ipd"/>
+    <eval expected="102500" xpath="//flow/block[2]/block[22]/@ipda"/>
+    <eval expected="44400" xpath="//flow/block[2]/block[22]/@bpd"/>
+    <eval expected="44400" xpath="//flow/block[2]/block[22]/@bpda"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[22]/@left-offset"/>
+    <eval expected="172800" xpath="//flow/block[2]/block[22]/@top-offset"/>
+    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[22]/@border-end"/>
+    <eval expected="97000" xpath="//flow/block[2]/block[23]/@ipd"/>
+    <eval expected="103000" xpath="//flow/block[2]/block[23]/@ipda"/>
+    <eval expected="49700" xpath="//flow/block[2]/block[23]/@bpd"/>
+    <eval expected="54700" xpath="//flow/block[2]/block[23]/@bpda"/>
+    <eval expected="203000" xpath="//flow/block[2]/block[23]/@left-offset"/>
+    <eval expected="217200" xpath="//flow/block[2]/block[23]/@top-offset"/>
+    <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[23]/@border-after"/>
+    <eval expected="(solid,#008000,6000,collapse-inner)" xpath="//flow/block[2]/block[23]/@border-start"/>
+    <eval expected="97500" xpath="//flow/block[2]/block[24]/@ipd"/>
+    <eval expected="102500" xpath="//flow/block[2]/block[24]/@ipda"/>
+    <eval expected="49700" xpath="//flow/block[2]/block[24]/@bpd"/>
+    <eval expected="54700" xpath="//flow/block[2]/block[24]/@bpda"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[24]/@left-offset"/>
+    <eval expected="217200" xpath="//flow/block[2]/block[24]/@top-offset"/>
+    <eval expected="(solid,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[24]/@border-after"/>
+    <eval expected="(dashed,#008000,5000,collapse-outer)" xpath="//flow/block[2]/block[24]/@border-end"/>
+    <eval expected="167500" xpath="//flow/block[2]/block[25]/@ipd"/>
+    <eval expected="167500" xpath="//flow/block[2]/block[25]/@ipda"/>
+    <eval expected="135400" xpath="//flow/block[2]/block[25]/@bpd"/>
+    <eval expected="135400" xpath="//flow/block[2]/block[25]/@bpda"/>
+    <eval expected="230000" xpath="//flow/block[2]/block[25]/@left-offset"/>
+    <eval expected="131500" xpath="//flow/block[2]/block[25]/@top-offset"/>
 
     <!-- table 2 -->
     <eval expected="199300" xpath="//flow/block[4]/@bpd"/>
diff --git a/test/layoutengine/standard-testcases/table_border-collapse_missing.xml b/test/layoutengine/standard-testcases/table_border-collapse_missing.xml
new file mode 100644 (file)
index 0000000..113841a
--- /dev/null
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks the behaviour in the collapsing border model when table-cells are missing.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="0.5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="page">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:table table-layout="fixed" width="100%"
+              border-collapse="collapse" border="solid 4pt black">
+            <fo:table-column column-width="proportional-column-width(2)"/>
+            <fo:table-column column-width="proportional-column-width(1)"/>
+            <fo:table-column column-width="proportional-column-width(2)"/>
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt red">
+                  <fo:block>cell A1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt green">
+                  <fo:block>cell B1</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt red">
+                  <fo:block>cell A2</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt green">
+                  <fo:block>cell B2</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt blue">
+                  <fo:block>cell C2</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt red">
+                  <fo:block>cell A3</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt blue" column-number="3">
+                  <fo:block>cell C3</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt blue" column-number="3">
+                  <fo:block>cell C4</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt red">
+                  <fo:block>cell A5</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt blue" column-number="3">
+                  <fo:block>cell C5</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt green" column-number="2">
+                  <fo:block>cell B6</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt blue">
+                  <fo:block>cell C6</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
+          <fo:table table-layout="fixed" width="100%" space-before="1.7in"
+            border-collapse="collapse" border="solid 4pt black">
+            <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="3"/>
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell border="solid 4pt red">
+                  <fo:block>cell A1 cell A1 cell A1 cell A1 cell A1 cell A1 cell A1 cell A1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="solid 4pt green">
+                  <fo:block>cell B1</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <!-- empty cell in row 1 (C1) -->
+    <eval expected="true"                                xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@is-reference-area"/>
+    <eval expected="absolute"                            xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@positioning"/>
+    <eval expected="14400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@bpd"/>
+    <eval expected="22400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@bpda"/>
+    <eval expected="111200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@ipd"/>
+    <eval expected="119200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@ipda"/>
+    <eval expected="-2000"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@top-offset"/>
+    <eval expected="174800"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@left-offset"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@border-before"/>
+    <eval expected="(solid,#008000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@border-start"/>
+    <eval expected="(solid,#0000ff,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@border-after"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[3]/@border-end"/>
+    <!-- empty cell in row 3 (B3) -->
+    <eval expected="16400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@bpd"/>
+    <eval expected="20400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@bpda"/>
+    <eval expected="53600"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@ipd"/>
+    <eval expected="61600"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@ipda"/>
+    <eval expected="34800"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@top-offset"/>
+    <eval expected="117200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@left-offset"/>
+    <eval expected="(solid,#008000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@border-before"/>
+    <eval expected="(solid,#ff0000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@border-start"/>
+    <true xpath="not(boolean(//pageViewport[@nr='1']//flow/block[1]/block[8]/@border-after))" fail-msg="border-after in B3 must be absent"/>
+    <eval expected="(solid,#0000ff,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[8]/@border-end"/>
+    <!-- empty cell in row 4 (A4) -->
+    <eval expected="14400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@bpd"/>
+    <eval expected="22400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@bpda"/>
+    <eval expected="113200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@ipd"/>
+    <eval expected="117200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@ipda"/>
+    <eval expected="53200"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@top-offset"/>
+    <eval expected="2000"                                xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@left-offset"/>
+    <eval expected="(solid,#ff0000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@border-before"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@border-start"/>
+    <eval expected="(solid,#ff0000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[10]/@border-after"/>
+    <true xpath="not(boolean(//pageViewport[@nr='1']//flow/block[1]/block[10]/@border-end))" fail-msg="border-end in A4 must be absent"/>
+    <!-- empty cell in row 4 (B4) -->
+    <eval expected="18400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@bpd"/>
+    <eval expected="18400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@bpda"/>
+    <eval expected="55600"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@ipd"/>
+    <eval expected="59600"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@ipda"/>
+    <eval expected="55200"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@top-offset"/>
+    <eval expected="115200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@left-offset"/>
+    <true xpath="not(boolean(//pageViewport[@nr='1']//flow/block[1]/block[11]/@border-before))" fail-msg="border-before in B4 must be absent"/>
+    <true xpath="not(boolean(//pageViewport[@nr='1']//flow/block[1]/block[11]/@border-start))" fail-msg="border-start in B4 must be absent"/>
+    <true xpath="not(boolean(//pageViewport[@nr='1']//flow/block[1]/block[11]/@border-after))" fail-msg="border-after in B4 must be absent"/>
+    <eval expected="(solid,#0000ff,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[11]/@border-end"/>
+    <!-- empty cell in row 6 (A6) -->
+    <eval expected="14400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@bpd"/>
+    <eval expected="22400"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@bpda"/>
+    <eval expected="111200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@ipd"/>
+    <eval expected="119200"                              xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@ipda"/>
+    <eval expected="90000"                               xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@top-offset"/>
+    <eval expected="2000"                                xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@left-offset"/>
+    <eval expected="(solid,#ff0000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@border-before"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@border-start"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@border-after"/>
+    <eval expected="(solid,#008000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[1]/block[16]/@border-end"/>
+    
+    <!-- *** second table *** -->
+    <!-- empty cell in row 1 (C1) -->
+    <eval expected="28800"                               xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpd"/>
+    <eval expected="32800"                               xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpda"/>
+    <eval expected="92000"                               xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@ipd"/>
+    <eval expected="100000"                              xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@ipda"/>
+    <eval expected="-2000"                               xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@top-offset"/>
+    <eval expected="194000"                              xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@left-offset"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-before"/>
+    <eval expected="(solid,#008000,4000,collapse-inner)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-start"/>
+    <true xpath="not(boolean(//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-after))" fail-msg="border-after in C1 must be absent"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-end"/>
+    <!-- empty cell in row 1 (C1), continued on next page -->
+    <eval expected="28800"                               xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpd"/>
+    <eval expected="32800"                               xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpda"/>
+    <eval expected="92000"                               xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@ipd"/>
+    <eval expected="100000"                              xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@ipda"/>
+    <true xpath="not(boolean(//pageViewport[@nr='2']//flow/block[1]/block[3]/@top-offset))" fail-msg="must not have a top-offset"/>
+    <eval expected="194000"                              xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@left-offset"/>
+    <true xpath="not(boolean(//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-before))" fail-msg="border-after in C1 must be absent"/>
+    <eval expected="(solid,#008000,4000,collapse-inner)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-start"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-after"/>
+    <eval expected="(solid,#000000,4000,collapse-outer)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-end"/>
+    
+  </checks>
+</testcase>