import java.util.Iterator;
import java.util.List;
+import org.apache.fop.fo.Constants;
import org.apache.fop.layoutmgr.table.TableRowIterator;
import org.apache.fop.traits.MinOptMax;
+import org.apache.fop.util.BreakUtil;
/**
* This class represents an effective row in a table and holds a list of grid units occupying
throw new IllegalArgumentException("Illegal flag queried: " + which);
}
}
-
+
+
+ /**
+ * Returns the break class for this row. This is a combination of break-before set on
+ * the first children of any cells starting on this row.
+ * <p><strong>Note:</strong> this works only after getNextKuthElements on the
+ * corresponding TableCellLM have been called!</p>
+ *
+ * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link
+ * Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}
+ */
+ public int getBreakBefore() {
+ int breakBefore = Constants.EN_AUTO;
+ for (Iterator iter = gridUnits.iterator(); iter.hasNext();) {
+ GridUnit gu = (GridUnit) iter.next();
+ if (gu.isPrimary()) {
+ breakBefore = BreakUtil.compareBreakClasses(breakBefore,
+ gu.getPrimary().getBreakBefore());
+ }
+ }
+ return breakBefore;
+ }
+
+ /**
+ * Returns the break class for this row. This is a combination of break-after set on
+ * the last children of any cells ending on this row.
+ * <p><strong>Note:</strong> this works only after getNextKuthElements on the
+ * corresponding TableCellLM have been called!</p>
+ *
+ * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link
+ * Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}
+ */
+ public int getBreakAfter() {
+ int breakAfter = Constants.EN_AUTO;
+ for (Iterator iter = gridUnits.iterator(); iter.hasNext();) {
+ GridUnit gu = (GridUnit) iter.next();
+ if (gu.isPrimary()) {
+ breakAfter = BreakUtil.compareBreakClasses(breakAfter,
+ gu.getPrimary().getBreakAfter());
+ }
+ }
+ return breakAfter;
+ }
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer("EffRow {");
/** {@inheritDoc} */
public boolean isPrimary() {
- return true;
+ return false;
}
/** {@inheritDoc} */
import java.util.LinkedList;
import java.util.List;
+import org.apache.fop.fo.Constants;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.table.TableCellLayoutManager;
private boolean isSeparateBorderModel;
private int halfBorderSeparationBPD;
+ private int breakBefore = Constants.EN_AUTO;
+ private int breakAfter = Constants.EN_AUTO;
+
/**
* Creates a new primary grid unit.
*
cellLM = new TableCellLayoutManager(cell, this);
}
+ /**
+ * Returns the class of the before break for the first child element of this cell.
+ *
+ * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link
+ * Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}
+ */
+ public int getBreakBefore() {
+ return breakBefore;
+ }
+
+ /**
+ * Don't use, reserved for TableCellLM. TODO
+ *
+ * @param breakBefore the breakBefore to set
+ */
+ public void setBreakBefore(int breakBefore) {
+ this.breakBefore = breakBefore;
+ }
+
+ /**
+ * Returns the class of the before after for the last child element of this cell.
+ *
+ * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link
+ * Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}
+ */
+ public int getBreakAfter() {
+ return breakAfter;
+ }
+
+ /**
+ * Don't use, reserved for TableCellLM. TODO
+ *
+ * @param breakAfter the breakAfter to set
+ */
+ public void setBreakAfter(int breakAfter) {
+ this.breakAfter = breakAfter;
+ }
+
}
} else {
nextStep.set(afterNextStep);
nextStep.start = previousStep.end + 1;
+ afterNextStep.start = nextStep.start;
if (afterNextStep.end < elementList.size() - 1) {
gotoNextLegalBreak();
}
}
}
- /**
- * Returns true if some content of this cell is part of the chosen next step.
- *
- * @return true if this cell's next step is inferior or equal to the next minimal step
- */
- boolean contributesContent() {
- // return includedInLastStep() && the cell hasn't finished yet, otherwise there's
- // nothing more to contribute
- return includedInLastStep() && nextStep.end >= nextStep.start;
- }
-
/**
* Returns true if this cell would be finished after the given step. That is, it would
* be included in the step and the end of its content would be reached.
}
}
- boolean isLastForcedBreak() {
- return ((KnuthElement)elementList.get(nextStep.end)).isForcedBreak();
- }
-
- int getLastBreakClass() {
- return ((KnuthPenalty)elementList.get(nextStep.end)).getBreakClass();
- }
-
boolean keepWithNextSignal() {
return keepWithNextSignal;
}
import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.layoutmgr.MinOptMaxUtil;
import org.apache.fop.traits.MinOptMax;
+import org.apache.fop.util.BreakUtil;
class RowGroupLayoutManager {
*/
int getBreakBefore() {
TableRow rowFO = rowGroup[0].getTableRow();
+ int breakBefore;
if (rowFO == null) {
- return Constants.EN_AUTO;
+ breakBefore = Constants.EN_AUTO;
} else {
- return rowFO.getBreakBefore();
+ breakBefore = rowFO.getBreakBefore();
}
+ return BreakUtil.compareBreakClasses(breakBefore, rowGroup[0].getBreakBefore());
}
/**
*/
int getBreakAfter() {
TableRow rowFO = rowGroup[rowGroup.length - 1].getTableRow();
+ int breakAfter;
if (rowFO == null) {
- return Constants.EN_AUTO;
+ breakAfter = Constants.EN_AUTO;
} else {
- return rowFO.getBreakAfter();
+ breakAfter = rowFO.getBreakAfter();
}
+ return BreakUtil.compareBreakClasses(breakAfter,
+ rowGroup[rowGroup.length - 1].getBreakAfter());
}
public LinkedList getNextKnuthElements(LayoutContext context, int alignment, int bodyType) {
for (int i = 0; i < colCount; i++) {
GridUnit currentGU = currentRow.getGridUnit(i);
if (!currentGU.isEmpty() && currentGU.getColSpanIndex() == 0
- && (lastInPart || currentGU.isLastGridUnitRowSpan())) {
+ && (lastInPart || currentGU.isLastGridUnitRowSpan())
+ && firstCellParts[i] != null) {
+ // TODO
+ // The last test above is a workaround for the stepping algorithm's
+ // fundamental flaw making it unable to produce the right element list for
+ // multiple breaks inside a same row group.
+ // (see http://wiki.apache.org/xmlgraphics-fop/TableLayout/KnownProblems)
+ // In some extremely rare cases (forced breaks, very small page height), a
+ // TableContentPosition produced during row delaying may end up alone on a
+ // page. It will not contain the CellPart instances for the cells starting
+ // the next row, so firstCellParts[i] will still be null for those ones.
int cellHeight = cellHeights[i];
cellHeight += lastCellParts[i].getConditionalAfterContentLength();
cellHeight += lastCellParts[i].getBorderPaddingAfter(lastInPart);
for (int i = 0; i < colCount; i++) {
GridUnit currentGU = currentRow.getGridUnit(i);
if (!currentGU.isEmpty() && currentGU.getColSpanIndex() == 0
- && (lastInPart || currentGU.isLastGridUnitRowSpan())) {
+ && (lastInPart || currentGU.isLastGridUnitRowSpan())
+ && firstCellParts[i] != null) {
assert firstCellParts[i].pgu == currentGU.getPrimary();
int borderBeforeWhich;
if (firstCellParts[i].start == 0) {
// with a SpaceResolver.SpaceHandlingBreakPosition element, having no
// LM associated to it. Thus it will stop early instead of adding
// areas for following Positions. The above test aims at preventing
- // such a situation from occuring. add a null penalty to allow a break
+ // such a situation from occurring. add a null penalty to allow a break
// between blocks
contentList.add(new BreakElement(
new Position(this), 0, context));
}
//Space resolution
SpaceResolver.resolveElementList(returnList);
+ if (((KnuthElement) returnList.getFirst()).isForcedBreak()) {
+ primaryGridUnit.setBreakBefore(((KnuthPenalty) returnList.getFirst()).getBreakClass());
+ returnList.removeFirst();
+ assert !returnList.isEmpty();
+ }
+ if (((KnuthElement) returnList.getLast()).isForcedBreak()) {
+ KnuthPenalty p = (KnuthPenalty) returnList.getLast();
+ primaryGridUnit.setBreakAfter(p.getBreakClass());
+ p.setP(0);
+ }
getPSLM().notifyEndOfLayout(((TableCell)getFObj()).getId());
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.layoutmgr.SpaceResolver.SpaceHandlingBreakPosition;
+import org.apache.fop.util.BreakUtil;
/**
* Layout manager for table contents, particularly managing the creation of combined element lists.
while ((rowGroup = iter.getNextRowGroup()) != null) {
RowGroupLayoutManager rowGroupLM = new RowGroupLayoutManager(getTableLM(), rowGroup,
stepper);
- if (breakBetween == Constants.EN_AUTO) {
- // TODO improve
- breakBetween = rowGroupLM.getBreakBefore();
- }
+ // TODO
+ // The RowGroupLM.getBreakBefore method will work correctly only after
+ // getNextKnuthElements is called. Indeed TableCellLM will set the values for
+ // breaks on PrimaryGridUnit once it has got the Knuth elements of its
+ // children. This can be changed once all the LMs adopt the same scheme of
+ // querying childrens LMs for breaks instead of producing penalty elements
+ List nextRowGroupElems = rowGroupLM.getNextKnuthElements(context, alignment, bodyType);
+ breakBetween = BreakUtil.compareBreakClasses(breakBetween, rowGroupLM.getBreakBefore());
if (breakBetween != Constants.EN_AUTO) {
if (returnList.size() > 0) {
BreakElement breakPoss = (BreakElement) returnList.getLast();
0, -KnuthPenalty.INFINITE, breakBetween, context));
}
}
- returnList.addAll(rowGroupLM.getNextKnuthElements(context, alignment, bodyType));
+ returnList.addAll(nextRowGroupElems);
breakBetween = rowGroupLM.getBreakAfter();
}
// Break after the table's last row
import org.apache.fop.layoutmgr.KnuthPenalty;
import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.Position;
+import org.apache.fop.util.BreakUtil;
/**
* This class processes row groups to create combined element lists for tables.
if (signalKeepWithNext || getTableLM().mustKeepTogether()) {
p = KnuthPenalty.INFINITE;
}
+ if (rowFinished && activeRowIndex < rowGroup.length - 1) {
+ nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
+ rowGroup[activeRowIndex].getBreakAfter());
+ nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
+ rowGroup[activeRowIndex + 1].getBreakBefore());
+ }
if (nextBreakClass != Constants.EN_AUTO) {
log.trace("Forced break encountered");
p = -KnuthPenalty.INFINITE; //Overrides any keeps (see 4.8 in XSL 1.0)
nextBreakClass = Constants.EN_AUTO;
for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
ActiveCell activeCell = (ActiveCell) iter.next();
- nextBreakClass = compareBreakClasses(nextBreakClass, activeCell.signalNextStep(step));
- }
- }
-
- // TODO replace that with a proper 1.5 enumeration ASAP
- // TODO this has nothing to do here
- private static int getBreakClassPriority(int breakClass) {
- switch (breakClass) {
- case Constants.EN_AUTO: return 0;
- case Constants.EN_COLUMN: return 1;
- case Constants.EN_PAGE: return 2;
- case Constants.EN_EVEN_PAGE: return 3;
- case Constants.EN_ODD_PAGE: return 3;
- default: throw new IllegalArgumentException();
- }
- }
-
- // TODO even-page and odd-page can't be compared to each other and instead create a
- // conflict situation. For now the first encountered break will win, but eventually
- // some warning message should be sent to the user.
- private static int compareBreakClasses(int b1, int b2) {
- int p1 = getBreakClassPriority(b1);
- int p2 = getBreakClassPriority(b2);
- if (p1 < p2) {
- return b2;
- } else {
- return b1;
+ nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
+ activeCell.signalNextStep(step));
}
}
--- /dev/null
+/*
+ * 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$ */
+
+package org.apache.fop.util;
+
+import org.apache.fop.fo.Constants;
+
+/**
+ * A utility class for manipulating break classes (the break-before and break-after properties).
+ */
+public final class BreakUtil {
+
+ private BreakUtil() { }
+
+ // TODO replace that with a proper 1.5 enumeration ASAP
+ private static int getBreakClassPriority(int breakClass) {
+ switch (breakClass) {
+ case Constants.EN_AUTO: return 0;
+ case Constants.EN_COLUMN: return 1;
+ case Constants.EN_PAGE: return 2;
+ case Constants.EN_EVEN_PAGE: return 3;
+ case Constants.EN_ODD_PAGE: return 3;
+ default: throw new IllegalArgumentException();
+ }
+ }
+
+ /**
+ * Compares the given break classes and return the one that wins. even-page and
+ * odd-page win over page, which wins over column, which wins over auto. If even-page
+ * and odd-page are compared to each other, which one will be returned is undefined.
+ *
+ * @param break1 a break class, one of {@link Constants#EN_AUTO},
+ * {@link Constants#EN_COLUMN}, {@link Constants#EN_PAGE},
+ * {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}
+ * @param break2 another break class
+ * @return the break class that wins the comparison
+ */
+ public static int compareBreakClasses(int break1, int break2) {
+ // TODO implement some warning mechanism if even-page and odd-page are being compared
+ int p1 = getBreakClassPriority(break1);
+ int p2 = getBreakClassPriority(break2);
+ if (p1 < p2) {
+ return break2;
+ } else {
+ return break1;
+ }
+ }
+
+}
<changes>
<release version="FOP Trunk">
+ <action context="Layout" dev="VH" type="add">
+ Added full support for breaks before and after table cells (that is, break-before/after set
+ on the first/last child of a cell).
+ </action>
<action context="Layout" dev="VH" type="add">
Added full support for breaks inside the cells of a table.
</action>
--- /dev/null
+<?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 that break-after set on blocks in table-cells works correctly in various
+ conditions: when headers/footers shall be repeated at page breaks or not, in the separate or
+ collapsing border model, etc.
+ </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="10cm" page-width="15cm" margin="1cm">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>1. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block break-after="page">Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>2. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block break-after="page">Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 3. separate border model, retained borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>3. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ border-before-width.length="2pt" border-before-width.conditionality="retain"
+ border-after-width.length="2pt" border-after-width.conditionality="retain"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block break-after="page">Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 4. separate border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>4. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block break-after="page">Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 5. separate border model, retained borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>5. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ border-before-width.length="2pt" border-before-width.conditionality="retain"
+ border-after-width.length="2pt" border-after-width.conditionality="retain"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block break-after="page">Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 6. collapsing border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>6. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block break-after="page">Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 7. collapsing border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>7. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block break-after="page">Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 8. collapsing border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>8. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block break-after="page">Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[1]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='1']//flow/block)"/>
+ <eval expected="1. Before the table" xpath="//pageViewport[@nr='1']//flow/block[1]//text"/>
+ <eval expected="48000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpd"/>
+ <eval expected="50000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='2']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='2']//flow/block[2]//text"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpd"/>
+ <eval expected="26000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-after"/>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[2]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='3']//flow/block)"/>
+ <eval expected="2. Before the table" xpath="//pageViewport[@nr='3']//flow/block[1]//text"/>
+ <eval expected="76000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpd"/>
+ <eval expected="78000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='4']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='4']//flow/block[2]//text"/>
+ <eval expected="52000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpd"/>
+ <eval expected="54000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='4']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 3. separate border model, retained borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[3]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='5']//flow/block)"/>
+ <eval expected="3. Before the table" xpath="//pageViewport[@nr='5']//flow/block[1]//text"/>
+ <eval expected="76000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpd"/>
+ <eval expected="80000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='6']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='6']//flow/block[2]//text"/>
+ <eval expected="52000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpd"/>
+ <eval expected="56000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 4. separate border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[4]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='7']//flow/block)"/>
+ <eval expected="4. Before the table" xpath="//pageViewport[@nr='7']//flow/block[1]//text"/>
+ <eval expected="62000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpd"/>
+ <eval expected="64000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='7']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='8']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='8']//flow/block[2]//text"/>
+ <eval expected="38000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpd"/>
+ <eval expected="40000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='8']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@border-after"/>
+
+ <!-- 5. separate border model, retained borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[5]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='9']//flow/block)"/>
+ <eval expected="5. Before the table" xpath="//pageViewport[@nr='9']//flow/block[1]//text"/>
+ <eval expected="62000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpd"/>
+ <eval expected="66000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='10']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='10']//flow/block[2]//text"/>
+ <eval expected="38000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpd"/>
+ <eval expected="42000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@border-after"/>
+
+ <!-- 6. collapsing border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[6]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='11']//flow/block)"/>
+ <eval expected="6. Before the table" xpath="//pageViewport[@nr='11']//flow/block[1]//text"/>
+ <eval expected="44000" xpath="//pageViewport[@nr='11']//flow/block[2]/@bpd"/>
+ <eval expected="44000" xpath="//pageViewport[@nr='11']//flow/block[2]/@bpda"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='12']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='12']//flow/block[2]//text"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='12']//flow/block[1]/@bpd"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='12']//flow/block[1]/@bpda"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@border-after"/>
+
+ <!-- 7. collapsing border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[7]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='13']//flow/block)"/>
+ <eval expected="7. Before the table" xpath="//pageViewport[@nr='13']//flow/block[1]//text"/>
+ <eval expected="68000" xpath="//pageViewport[@nr='13']//flow/block[2]/@bpd"/>
+ <eval expected="68000" xpath="//pageViewport[@nr='13']//flow/block[2]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[7]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[8]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='14']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='14']//flow/block[2]//text"/>
+ <eval expected="46000" xpath="//pageViewport[@nr='14']//flow/block[1]/@bpd"/>
+ <eval expected="46000" xpath="//pageViewport[@nr='14']//flow/block[1]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 8. collapsing border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[8]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='15']//flow/block)"/>
+ <eval expected="8. Before the table" xpath="//pageViewport[@nr='15']//flow/block[1]//text"/>
+ <eval expected="56000" xpath="//pageViewport[@nr='15']//flow/block[2]/@bpd"/>
+ <eval expected="56000" xpath="//pageViewport[@nr='15']//flow/block[2]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='16']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='16']//flow/block[2]//text"/>
+ <eval expected="34000" xpath="//pageViewport[@nr='16']//flow/block[1]/@bpd"/>
+ <eval expected="34000" xpath="//pageViewport[@nr='16']//flow/block[1]/@bpda"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@border-after"/>
+
+ </checks>
+</testcase>
--- /dev/null
+<?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 that break-after set on blocks in table-cells works correctly in various
+ conditions: when headers/footers shall be repeated at page breaks or not, in the separate or
+ collapsing border model, etc.
+ </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="10cm" page-width="15cm" margin="1cm">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>1. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block break-after="page">Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>2. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block break-after="page">Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 3. separate border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>3. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block break-after="page">Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 4. collapsing border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>4. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block break-after="page">Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 5. collapsing border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>5. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block break-after="page">Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 6. collapsing border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>6. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block break-after="page">Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[1]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='1']//flow/block)"/>
+ <eval expected="1. Before the table" xpath="//pageViewport[@nr='1']//flow/block[1]//text"/>
+ <eval expected="72000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpd"/>
+ <!--eval expected="76000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpda"/-->
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-before"/>
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-after"/-->
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="1" xpath="count(//pageViewport[@nr='2']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='2']//flow/block[1]//text"/>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[2]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='3']//flow/block)"/>
+ <eval expected="2. Before the table" xpath="//pageViewport[@nr='3']//flow/block[1]//text"/>
+ <eval expected="100000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpd"/>
+ <!--eval expected="104000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpda"/-->
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-before"/>
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-after"/-->
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[10]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="1" xpath="count(//pageViewport[@nr='4']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='4']//flow/block[1]//text"/>
+
+ <!-- 3. separate border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[3]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='5']//flow/block)"/>
+ <eval expected="3. Before the table" xpath="//pageViewport[@nr='5']//flow/block[1]//text"/>
+ <eval expected="100000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpd"/>
+ <!--eval expected="104000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpda"/-->
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/@border-before"/>
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/@border-after"/-->
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[10]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="1" xpath="count(//pageViewport[@nr='6']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='6']//flow/block[1]//text"/>
+
+ <!-- 4. collapsing border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[4]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='7']//flow/block)"/>
+ <eval expected="4. Before the table" xpath="//pageViewport[@nr='7']//flow/block[1]//text"/>
+ <eval expected="66000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpd"/>
+ <eval expected="66000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpda"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="1" xpath="count(//pageViewport[@nr='8']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='8']//flow/block[1]//text"/>
+
+ <!-- 5. collapsing border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[5]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='9']//flow/block)"/>
+ <eval expected="5. Before the table" xpath="//pageViewport[@nr='9']//flow/block[1]//text"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpd"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[10]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="1" xpath="count(//pageViewport[@nr='10']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='10']//flow/block[1]//text"/>
+
+ <!-- 6. collapsing border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[6]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='11']//flow/block)"/>
+ <eval expected="6. Before the table" xpath="//pageViewport[@nr='11']//flow/block[1]//text"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='11']//flow/block[2]/@bpd"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='11']//flow/block[2]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[10]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="1" xpath="count(//pageViewport[@nr='12']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='12']//flow/block[1]//text"/>
+
+ </checks>
+</testcase>
--- /dev/null
+<?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 that break-before set on blocks in table-cells works correctly in various
+ conditions: when headers/footers shall be repeated at page breaks or not, in the separate or
+ collapsing border model, etc.
+ </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="10cm" page-width="15cm" margin="1cm">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>1. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>2. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 3. separate border model, retained borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>3. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ border-before-width.length="2pt" border-before-width.conditionality="retain"
+ border-after-width.length="2pt" border-after-width.conditionality="retain"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 4. separate border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>4. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 5. separate border model, retained borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>5. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ border-before-width.length="2pt" border-before-width.conditionality="retain"
+ border-after-width.length="2pt" border-after-width.conditionality="retain"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 6. collapsing border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>6. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 7. collapsing border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>7. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 8. collapsing border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>8. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[1]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='1']//flow/block)"/>
+ <eval expected="1. Before the table" xpath="//pageViewport[@nr='1']//flow/block[1]//text"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpd"/>
+ <eval expected="26000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='2']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='2']//flow/block[2]//text"/>
+ <eval expected="48000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpd"/>
+ <eval expected="50000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@border-after"/>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[2]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='3']//flow/block)"/>
+ <eval expected="2. Before the table" xpath="//pageViewport[@nr='3']//flow/block[1]//text"/>
+ <eval expected="52000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpd"/>
+ <eval expected="54000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='4']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='4']//flow/block[2]//text"/>
+ <eval expected="76000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpd"/>
+ <eval expected="78000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='4']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@border-after"/>
+
+ <!-- 3. separate border model, retained borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[3]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='5']//flow/block)"/>
+ <eval expected="3. Before the table" xpath="//pageViewport[@nr='5']//flow/block[1]//text"/>
+ <eval expected="52000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpd"/>
+ <eval expected="56000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='6']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='6']//flow/block[2]//text"/>
+ <eval expected="76000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpd"/>
+ <eval expected="80000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@border-after"/>
+
+ <!-- 4. separate border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[4]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='7']//flow/block)"/>
+ <eval expected="4. Before the table" xpath="//pageViewport[@nr='7']//flow/block[1]//text"/>
+ <eval expected="38000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpd"/>
+ <eval expected="40000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='7']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[4]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='8']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='8']//flow/block[2]//text"/>
+ <eval expected="62000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpd"/>
+ <eval expected="64000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='8']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 5. separate border model, retained borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[5]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='9']//flow/block)"/>
+ <eval expected="5. Before the table" xpath="//pageViewport[@nr='9']//flow/block[1]//text"/>
+ <eval expected="38000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpd"/>
+ <eval expected="42000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/@border-after"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[4]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='10']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='10']//flow/block[2]//text"/>
+ <eval expected="62000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpd"/>
+ <eval expected="66000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 6. collapsing border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[6]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='11']//flow/block)"/>
+ <eval expected="6. Before the table" xpath="//pageViewport[@nr='11']//flow/block[1]//text"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='11']//flow/block[2]/@bpd"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='11']//flow/block[2]/@bpda"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='11']//flow/block[2]/block[2]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='12']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='12']//flow/block[2]//text"/>
+ <eval expected="44000" xpath="//pageViewport[@nr='12']//flow/block[1]/@bpd"/>
+ <eval expected="44000" xpath="//pageViewport[@nr='12']//flow/block[1]/@bpda"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@border-after"/>
+
+ <!-- 7. collapsing border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[7]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='13']//flow/block)"/>
+ <eval expected="7. Before the table" xpath="//pageViewport[@nr='13']//flow/block[1]//text"/>
+ <eval expected="46000" xpath="//pageViewport[@nr='13']//flow/block[2]/@bpd"/>
+ <eval expected="46000" xpath="//pageViewport[@nr='13']//flow/block[2]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='13']//flow/block[2]/block[6]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='14']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='14']//flow/block[2]//text"/>
+ <eval expected="68000" xpath="//pageViewport[@nr='14']//flow/block[1]/@bpd"/>
+ <eval expected="68000" xpath="//pageViewport[@nr='14']//flow/block[1]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[6]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[7]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='14']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='14']//flow/block[1]/block[8]/@border-after"/>
+
+ <!-- 8. collapsing border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[8]/pageViewport)"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='15']//flow/block)"/>
+ <eval expected="8. Before the table" xpath="//pageViewport[@nr='15']//flow/block[1]//text"/>
+ <eval expected="34000" xpath="//pageViewport[@nr='15']//flow/block[2]/@bpd"/>
+ <eval expected="34000" xpath="//pageViewport[@nr='15']//flow/block[2]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='15']//flow/block[2]/block[4]/@border-after"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='16']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='16']//flow/block[2]//text"/>
+ <eval expected="56000" xpath="//pageViewport[@nr='16']//flow/block[1]/@bpd"/>
+ <eval expected="56000" xpath="//pageViewport[@nr='16']//flow/block[1]/@bpda"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[4]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[5]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='16']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='16']//flow/block[1]/block[6]/@border-after"/>
+
+ </checks>
+</testcase>
--- /dev/null
+<?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 that break-before set on blocks in table-cells works correctly in various
+ conditions: when headers/footers shall be repeated at page breaks or not, in the separate or
+ collapsing border model, etc.
+ </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="10cm" page-width="15cm" margin="1cm">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>1. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>2. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 3. separate border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>3. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 4. collapsing border model, discarded borders, no header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>4. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 5. collapsing border model, discarded borders, repeated header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>5. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="false" table-omit-footer-at-break="false">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- 6. collapsing border model, discarded borders, omitted header/footer -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>6. Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="collapse" border="2pt solid black"
+ table-omit-header-at-break="true" table-omit-footer-at-break="true">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-header>
+ <fo:table-row border="2pt solid blue">
+ <fo:table-cell border="inherit"><fo:block>Header 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Header 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-row border="2pt solid purple">
+ <fo:table-cell border="inherit"><fo:block>Footer 1.1</fo:block></fo:table-cell>
+ <fo:table-cell border="inherit"><fo:block>Footer 1.2</fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row border="2pt solid green">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block break-before="page">Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid red">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="2pt solid orange">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 3.2</fo:block>
+ <fo:block>Cell 3.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- 1. separate border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[1]/pageViewport)"/>
+ <eval expected="1" xpath="count(//pageViewport[@nr='1']//flow/block)"/>
+ <eval expected="1. Before the table" xpath="//pageViewport[@nr='1']//flow/block[1]//text"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='2']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='2']//flow/block[2]//text"/>
+ <eval expected="72000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpd"/>
+ <!--eval expected="76000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpda"/-->
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-before"/-->
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-after"/-->
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 2. separate border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[2]/pageViewport)"/>
+ <eval expected="1" xpath="count(//pageViewport[@nr='3']//flow/block)"/>
+ <eval expected="2. Before the table" xpath="//pageViewport[@nr='3']//flow/block[1]//text"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='4']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='4']//flow/block[2]//text"/>
+ <eval expected="100000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpd"/>
+ <!--eval expected="104000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpda"/-->
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/@border-before"/-->
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/@border-after"/-->
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[10]/@border-after"/>
+
+ <!-- 3. separate border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[3]/pageViewport)"/>
+ <eval expected="1" xpath="count(//pageViewport[@nr='5']//flow/block)"/>
+ <eval expected="3. Before the table" xpath="//pageViewport[@nr='5']//flow/block[1]//text"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='6']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='6']//flow/block[2]//text"/>
+ <eval expected="100000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpd"/>
+ <!--eval expected="104000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpda"/-->
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/@border-before"/-->
+ <!--eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/@border-after"/-->
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[10]/@border-after"/>
+
+ <!-- 4. collapsing border model, discarded borders, no header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[4]/pageViewport)"/>
+ <eval expected="1" xpath="count(//pageViewport[@nr='7']//flow/block)"/>
+ <eval expected="4. Before the table" xpath="//pageViewport[@nr='7']//flow/block[1]//text"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='8']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='8']//flow/block[2]//text"/>
+ <eval expected="66000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpd"/>
+ <eval expected="66000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpda"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-outer)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-outer)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[6]/@border-after"/>
+
+ <!-- 5. collapsing border model, discarded borders, repeated header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[5]/pageViewport)"/>
+ <eval expected="1" xpath="count(//pageViewport[@nr='9']//flow/block)"/>
+ <eval expected="5. Before the table" xpath="//pageViewport[@nr='9']//flow/block[1]//text"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='10']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='10']//flow/block[2]//text"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpd"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[10]/@border-after"/>
+
+ <!-- 6. collapsing border model, discarded borders, omitted header/footer -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[6]/pageViewport)"/>
+ <eval expected="1" xpath="count(//pageViewport[@nr='11']//flow/block)"/>
+ <eval expected="6. Before the table" xpath="//pageViewport[@nr='11']//flow/block[1]//text"/>
+ <!-- page 2 -->
+ <eval expected="2" xpath="count(//pageViewport[@nr='12']//flow/block)"/>
+ <eval expected="After the table" xpath="//pageViewport[@nr='12']//flow/block[2]//text"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='12']//flow/block[1]/@bpd"/>
+ <eval expected="90000" xpath="//pageViewport[@nr='12']//flow/block[1]/@bpda"/>
+ <!-- header 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[1]/@border-after"/>
+ <!-- header 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[3]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@bpda"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@border-before"/>
+ <eval expected="(solid,#008000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[4]/@border-after"/>
+ <!-- cell 2.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[5]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[5]/@border-after"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[6]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[6]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[6]/@border-after"/>
+ <!-- cell 3.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[7]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[7]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[7]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[7]/@border-after"/>
+ <!-- cell 3.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[8]/@bpda"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[8]/@border-before"/>
+ <eval expected="(solid,#ffa500,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[8]/@border-after"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[9]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[9]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[9]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[9]/@border-after"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[10]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport[@nr='12']//flow/block[1]/block[10]/@bpda"/>
+ <eval expected="(solid,#800080,2000,collapse-inner)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[10]/@border-before"/>
+ <eval expected="(solid,#800080,2000,collapse-outer)" xpath="//pageViewport[@nr='12']//flow/block[1]/block[10]/@border-after"/>
+
+ </checks>
+</testcase>
<testcase>
<info>
<p>
- This test checks that break-before set on table-rows work correctly in various conditions:
- when headers/footers shall be repeated at page breaks or not, in the separate or collapsing
- border model, etc.
+ This test checks that break-before set on blocks in table-cells works correctly in various
+ conditions: when headers/footers shall be repeated at page breaks or not, in the separate or
+ collapsing border model, etc.
</p>
</info>
<fo>
--- /dev/null
+<?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 that breaks on blocks inside cells work correctly when row spanning is in
+ progress.
+ </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="4in" page-width="5in" margin="0.5in">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <!-- table 1 -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body border="2pt solid blue">
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit" number-rows-spanned="2">
+ <fo:block>Cell 1.1 Line 1</fo:block>
+ <fo:block>Cell 1.1 Line 2</fo:block>
+ <fo:block>Cell 1.1 Line 3</fo:block>
+ <fo:block>Cell 1.1 Line 4</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit" border-color="red">
+ <fo:block>Cell 1.2 Line 1</fo:block>
+ <fo:block break-after="page">Cell 1.2 Line 2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 2.2 Line 1</fo:block>
+ <fo:block>Cell 2.2 Line 2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <!-- table 2 -->
+ <!-- the break-before="odd-page" on cell 2.1 should win over the break-after="page" of
+ cell 1.1 -->
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="2pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body border="2pt solid blue">
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit" border-color="red">
+ <fo:block>Cell 1.1 Line 1</fo:block>
+ <fo:block break-after="page">Cell 1.1 Line 2</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit" number-rows-spanned="2">
+ <fo:block>Cell 1.2 Line 1</fo:block>
+ <fo:block>Cell 1.2 Line 2</fo:block>
+ <fo:block>Cell 1.2 Line 3</fo:block>
+ <fo:block>Cell 1.2 Line 4</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit" border-color="red">
+ <fo:block break-before="odd-page">Cell 2.1 Line 1</fo:block>
+ <fo:block>Cell 2.1 Line 2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- table 1 -->
+ <!-- page 1 -->
+ <eval expected="2" xpath="count(//pageSequence[1]/pageViewport)"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpd"/>
+ <eval expected="26000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="22000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='1']//flow/block[2]/block[1]/block)"/>
+ <eval expected="Cell 1.1 Line 1" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/block[1]"/>
+ <eval expected="Cell 1.1 Line 2" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/block[2]"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='1']//flow/block[2]/block[2]/block)"/>
+ <eval expected="Cell 1.2 Line 1" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/block[1]"/>
+ <eval expected="Cell 1.2 Line 2" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/block[2]"/>
+ <!-- page 2 -->
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpd"/>
+ <eval expected="26000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="22000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='2']//flow/block[1]/block[1]/block)"/>
+ <eval expected="Cell 1.1 Line 3" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/block[1]"/>
+ <eval expected="Cell 1.1 Line 4" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/block[2]"/>
+ <!-- cell 2.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='2']//flow/block[1]/block[2]/block)"/>
+ <eval expected="Cell 2.2 Line 1" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/block[1]"/>
+ <eval expected="Cell 2.2 Line 2" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/block[2]"/>
+
+ <!-- table 2 -->
+ <!-- page 1 -->
+ <eval expected="3" xpath="count(//pageSequence[2]/pageViewport)"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpd"/>
+ <eval expected="26000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpda"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='3']//flow/block[2]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='3']//flow/block[2]/block[1]/block)"/>
+ <eval expected="Cell 1.1 Line 1" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/block[1]"/>
+ <eval expected="Cell 1.1 Line 2" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/block[2]"/>
+ <!-- cell 1.2 -->
+ <eval expected="22000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='3']//flow/block[2]/block[2]/block)"/>
+ <eval expected="Cell 1.2 Line 1" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/block[1]"/>
+ <eval expected="Cell 1.2 Line 2" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/block[2]"/>
+ <!-- page 3 -->
+ <eval expected="0" xpath="count(//pageViewport[@nr='4']//flow/block)"/>
+ <!-- page 2 -->
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[1]/@bpd"/>
+ <eval expected="26000" xpath="//pageViewport[@nr='5']//flow/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='5']//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,2000)" xpath="//pageViewport[@nr='5']//flow/block[1]/@border-after"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='5']//flow/block[1]/block[1]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='5']//flow/block[1]/block[1]/block)"/>
+ <eval expected="Cell 2.1 Line 1" xpath="//pageViewport[@nr='5']//flow/block[1]/block[1]/block[1]"/>
+ <eval expected="Cell 2.1 Line 2" xpath="//pageViewport[@nr='5']//flow/block[1]/block[1]/block[2]"/>
+ <!-- cell 1.2 -->
+ <eval expected="22000" xpath="//pageViewport[@nr='5']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="24000" xpath="//pageViewport[@nr='5']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='5']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='5']//flow/block[1]/block[2]/@border-after"/>
+ <eval expected="2" xpath="count(//pageViewport[@nr='5']//flow/block[1]/block[2]/block)"/>
+ <eval expected="Cell 1.2 Line 3" xpath="//pageViewport[@nr='5']//flow/block[1]/block[2]/block[1]"/>
+ <eval expected="Cell 1.2 Line 4" xpath="//pageViewport[@nr='5']//flow/block[1]/block[2]/block[2]"/>
+
+ </checks>
+</testcase>