]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
My space resolution work so far. Current issues:
authorJeremias Maerki <jeremias@apache.org>
Thu, 13 Oct 2005 18:04:49 +0000 (18:04 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 13 Oct 2005 18:04:49 +0000 (18:04 +0000)
- no space resolution for tables, yet.
- spaces inside list-item-labels and list-item-body to properly set up for addAreas stage.
- conditional lengths on lists not checked, yet.
- block w=0 causes a fence right now although it shouldn't.
- no space resolution due to space-before and space-after caused by the line-height property (I've totally skipped that for now)

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

87 files changed:
src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
src/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java
src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
src/java/org/apache/fop/layoutmgr/BorderElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/BorderOrPaddingElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/BreakElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/ElementListUtils.java
src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
src/java/org/apache/fop/layoutmgr/KnuthElement.java
src/java/org/apache/fop/layoutmgr/LayoutContext.java
src/java/org/apache/fop/layoutmgr/ListElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/PaddingElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
src/java/org/apache/fop/layoutmgr/PositionIterator.java
src/java/org/apache/fop/layoutmgr/RelSide.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/SpaceElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/SpaceResolver.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/TraitSetter.java
src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java [new file with mode: 0644]
src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
src/java/org/apache/fop/render/AbstractRenderer.java
src/java/org/apache/fop/traits/MinOptMax.java
test/java/org/apache/fop/logging/LoggingElementListObserver.java
test/layoutengine/disabled-testcases.txt
test/layoutengine/testcases/block-container_display-align_space-before.xml
test/layoutengine/testcases/block-container_space-before_space-after_1.xml [new file with mode: 0644]
test/layoutengine/testcases/block-container_space-before_space-after_2.xml [new file with mode: 0644]
test/layoutengine/testcases/block_border_padding.xml
test/layoutengine/testcases/block_margin.xml
test/layoutengine/testcases/block_margin_inherit.xml
test/layoutengine/testcases/block_margin_percentages.xml
test/layoutengine/testcases/block_margin_shorthands.xml
test/layoutengine/testcases/block_padding_2.xml
test/layoutengine/testcases/block_space-before_space-after_1.xml
test/layoutengine/testcases/block_space-before_space-after_2.xml
test/layoutengine/testcases/block_space-before_space-after_3.xml
test/layoutengine/testcases/block_space-before_space-after_4.xml [new file with mode: 0644]
test/layoutengine/testcases/block_space-before_space-after_5.xml [new file with mode: 0644]
test/layoutengine/testcases/block_space-before_space-after_6.xml [new file with mode: 0644]
test/layoutengine/testcases/block_space-before_space-after_7.xml [new file with mode: 0644]
test/layoutengine/testcases/character_border_padding.xml
test/layoutengine/testcases/character_vertical-align.xml
test/layoutengine/testcases/inline_alignment-adjust_1.xml
test/layoutengine/testcases/inline_alignment-adjust_2.xml
test/layoutengine/testcases/inline_alignment-baseline_1.xml
test/layoutengine/testcases/inline_alignment-baseline_2.xml
test/layoutengine/testcases/inline_alignment-baseline_3.xml
test/layoutengine/testcases/inline_alignment-baseline_4.xml
test/layoutengine/testcases/inline_background-color.xml
test/layoutengine/testcases/inline_baseline-shift_1.xml
test/layoutengine/testcases/inline_baseline-shift_2.xml
test/layoutengine/testcases/inline_baseline-shift_3.xml
test/layoutengine/testcases/inline_baseline-shift_4.xml
test/layoutengine/testcases/inline_border_padding.xml
test/layoutengine/testcases/inline_border_padding_conditionality_1.xml
test/layoutengine/testcases/inline_border_padding_conditionality_2.xml
test/layoutengine/testcases/inline_border_padding_hyphenate.xml
test/layoutengine/testcases/inline_border_padding_hyphenate_de.xml
test/layoutengine/testcases/inline_dominant-baseline_1.xml
test/layoutengine/testcases/inline_dominant-baseline_2.xml
test/layoutengine/testcases/inline_dominant-baseline_3.xml
test/layoutengine/testcases/inline_vertical-align_1.xml
test/layoutengine/testcases/inline_vertical-align_2.xml
test/layoutengine/testcases/leader_border_padding.xml
test/layoutengine/testcases/list-block_border_padding.xml
test/layoutengine/testcases/list-block_space-before_space-after_1.xml [new file with mode: 0644]
test/layoutengine/testcases/list-block_space-before_space-after_2.xml [new file with mode: 0644]
test/layoutengine/testcases/list-item_space-before_space-after_1.xml
test/layoutengine/testcases/list-item_space-before_space-after_2.xml
test/layoutengine/testcases/list-item_space-before_space-after_3.xml [new file with mode: 0644]
test/layoutengine/testcases/page-breaking_2.xml
test/layoutengine/testcases/page-number-citation_border_padding.xml
test/layoutengine/testcases/page-number-citation_vertical-align.xml
test/layoutengine/testcases/page-number_border_padding.xml
test/layoutengine/testcases/page-number_vertical-align.xml
test/layoutengine/testcases/table-cell_block_margin_percentage.xml

index 74df8e188f3121b2e5d46921f3410f0ee20a5f41..991b363f857c1978d5f8a829c2ef9bc1f3952528 100644 (file)
@@ -273,6 +273,7 @@ public abstract class AbstractBreaker {
         ListIterator effectiveListIterator = effectiveList.listIterator();
         int startElementIndex = 0;
         int endElementIndex = 0;
+        int lastBreak = -1;
         for (int p = 0; p < partCount; p++) {
             PageBreakPosition pbp = (PageBreakPosition) alg.getPageBreaks().get(p);
 
@@ -328,7 +329,7 @@ public abstract class AbstractBreaker {
             while (effectiveListIterator.hasNext()
                     && !(firstElement = (KnuthElement) effectiveListIterator.next())
                             .isBox()) {
-                if (firstElement.isGlue()) {
+                if (firstElement.isGlue() && firstElement.getLayoutManager() != null) {
                     // discard the space representd by the glue element
                     ((BlockLevelLayoutManager) firstElement
                             .getLayoutManager())
@@ -377,6 +378,11 @@ public abstract class AbstractBreaker {
                 }
                 /* *** *** non-standard extension *** *** */
 
+                // Handle SpaceHandling(Break)Positions, see SpaceResolver!
+                performConditionalsNotification(effectiveList, 
+                        startElementIndex, endElementIndex, lastBreak);
+                
+                // Add areas now!
                 addAreas(new KnuthPossPosIter(effectiveList,
                         startElementIndex, endElementIndex + 1), childLC);
             } else {
@@ -386,9 +392,54 @@ public abstract class AbstractBreaker {
 
             finishPart(alg, pbp);
 
+            lastBreak = endElementIndex;
             startElementIndex = pbp.getLeafPos() + 1;
         }
     }
+    /**
+     * Notifies the layout managers about the space and conditional length situation based on
+     * the break decisions.
+     * @param effectiveList Element list to be painted
+     * @param startElementIndex start index of the part
+     * @param endElementIndex end index of the part
+     * @param lastBreak index of the last break element
+     */
+    private void performConditionalsNotification(BlockSequence effectiveList, 
+            int startElementIndex, int endElementIndex, int lastBreak) {
+        KnuthElement el = null;
+        if (lastBreak > 0) {
+            el = effectiveList.getElement(lastBreak);
+        }
+        SpaceResolver.SpaceHandlingBreakPosition beforeBreak = null;
+        SpaceResolver.SpaceHandlingBreakPosition afterBreak = null;
+        if (el != null && el.isPenalty()) {
+            Position pos = el.getPosition();
+            if (pos instanceof SpaceResolver.SpaceHandlingBreakPosition) {
+                beforeBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos; 
+                beforeBreak.notifyBreakSituation(true, RelSide.BEFORE);
+            }
+        }
+        el = effectiveList.getElement(endElementIndex);
+        if (el != null && el.isPenalty()) {
+            Position pos = el.getPosition();
+            if (pos instanceof SpaceResolver.SpaceHandlingBreakPosition) {
+                afterBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos; 
+                afterBreak.notifyBreakSituation(true, RelSide.AFTER);
+            }
+        }
+        for (int i = startElementIndex; i <= endElementIndex; i++) {
+            Position pos = effectiveList.getElement(i).getPosition();
+            if (pos instanceof SpaceResolver.SpaceHandlingPosition) {
+                ((SpaceResolver.SpaceHandlingPosition)pos).notifySpaceSituation();
+            } else if (pos instanceof SpaceResolver.SpaceHandlingBreakPosition) {
+                SpaceResolver.SpaceHandlingBreakPosition noBreak;
+                noBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos;
+                if (noBreak != beforeBreak && noBreak != afterBreak) {
+                    noBreak.notifyBreakSituation(false, null);
+                }
+            }
+        }
+    }
     
     /**
      * Handles span changes reported through the <code>LayoutContext</code>. 
index 44ad1496bf300c73e32f5d5835b6964821dfec7d..8093ee071dc44a08c4f86b99ef69fe343d3912b5 100644 (file)
@@ -21,6 +21,8 @@ package org.apache.fop.layoutmgr;
 import java.util.Iterator;
 import java.util.LinkedList;
 
+import org.apache.fop.layoutmgr.SpaceResolver.SpaceHandlingBreakPosition;
+
 public class AreaAdditionUtil {
 
     private static class StackingIter extends PositionIterator {
@@ -52,6 +54,10 @@ public class AreaAdditionUtil {
         Position pos;
         while (parentIter.hasNext()) {
             pos = (Position)parentIter.next();
+            if (pos == null) {
+                //positionList.add(new IgnorePosition(null));
+                continue;
+            }
             if (pos.getIndex() >= 0) {
                 if (firstPos == null) {
                     firstPos = pos;
@@ -65,6 +71,8 @@ public class AreaAdditionUtil {
                 if (firstLM == null) {
                     firstLM = lastLM;
                 }
+            } else if (pos instanceof SpaceHandlingBreakPosition) {
+                positionList.add(pos);
             } else {
                 // pos was created by this LM, so it must be ignored
             }
index 55dd12ddee1579556f20be68100fa49ed9775c7e..a215ed6edbd129c739d2769d72068ee686aaac4b 100644 (file)
@@ -39,7 +39,8 @@ import org.apache.fop.traits.SpaceVal;
 /**
  * LayoutManager for a block-container FO.
  */
-public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
+public class BlockContainerLayoutManager extends BlockStackingLayoutManager 
+                implements ConditionalElementListener {
     
     private BlockViewport viewportBlockArea;
     private Block referenceArea;
@@ -68,6 +69,14 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
     private MinOptMax foBlockSpaceBefore;
     private MinOptMax foBlockSpaceAfter;
     
+    private boolean discardBorderBefore;
+    private boolean discardBorderAfter;
+    private boolean discardPaddingBefore;
+    private boolean discardPaddingAfter;
+    private MinOptMax effSpaceBefore;
+    private MinOptMax effSpaceAfter;
+
+    
     /**
      * Create a new block container layout manager.
      * @param node block-container node to create the layout manager for.
@@ -111,6 +120,15 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
                 .spaceAfter.getSpace().getMinimum(this).getLength().getValue(this);
         }
     }
+    
+    private void resetSpaces() {
+        this.discardBorderBefore = false;        
+        this.discardBorderAfter = false;        
+        this.discardPaddingBefore = false;        
+        this.discardPaddingAfter = false;
+        this.effSpaceBefore = foSpaceBefore;
+        this.effSpaceAfter = foSpaceAfter;
+    }
 
     /** @return the content IPD */
     protected int getRotatedIPD() {
@@ -151,6 +169,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
     
     /** @see org.apache.fop.layoutmgr.LayoutManager */
     public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+        resetSpaces();
         if (isAbsoluteOrFixed()) {
             return getNextKnuthElementsAbsolute(context, alignment);
         }
@@ -201,7 +220,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
         
         if (!bBreakBeforeServed) {
             try {
-                if (addKnuthElementsForBreakBefore(returnList)) {
+                if (addKnuthElementsForBreakBefore(returnList, context)) {
                     return returnList;
                 }
             } finally {
@@ -217,10 +236,14 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
         addKnuthElementsForBorderPaddingBefore(returnList);
 
         if (autoHeight) {
+            //Spaces, border and padding to be repeated at each break
+            addPendingMarks(context);
+
             BlockLevelLayoutManager curLM; // currently active LM
             BlockLevelLayoutManager prevLM = null; // previously active LM
             while ((curLM = (BlockLevelLayoutManager) getChildLM()) != null) {
                 LayoutContext childLC = new LayoutContext(0);
+                childLC.copyPendingMarksFrom(context);
                 // curLM is a ?
                 childLC.setStackLimit(MinOptMax.subtract(context
                         .getStackLimit(), stackLimit));
@@ -230,9 +253,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
                 // get elements from curLM
                 returnedList = curLM.getNextKnuthElements(childLC, alignment);
                 if (returnedList.size() == 1
-                        && ((KnuthElement)returnedList.getFirst()).isPenalty()
-                        && ((KnuthPenalty)returnedList.getFirst()).getP() 
-                                == -KnuthElement.INFINITE) {
+                        && ((KnuthElement)returnedList.getFirst()).isForcedBreak()) {
                     // a descendant of this block has break-before
                     if (returnList.size() == 0) {
                         // the first child (or its first child ...) has
@@ -259,13 +280,17 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
                                 || curLM.mustKeepWithPrevious()) {
                             // add an infinite penalty to forbid a break between
                             // blocks
-                            contentList.add(new KnuthPenalty(0,
-                                    KnuthElement.INFINITE, false,
-                                    new Position(this), false));
+                            contentList.add(new BreakElement(
+                                    new Position(this), KnuthElement.INFINITE, context));
+                            //contentList.add(new KnuthPenalty(0,
+                            //        KnuthElement.INFINITE, false,
+                            //        new Position(this), false));
                         } else if (!((KnuthElement) contentList.getLast()).isGlue()) {
                             // add a null penalty to allow a break between blocks
-                            contentList.add(new KnuthPenalty(0, 0, false,
-                                    new Position(this), false));
+                            contentList.add(new BreakElement(
+                                    new Position(this), 0, context));
+                            //contentList.add(new KnuthPenalty(0, 0, false,
+                            //        new Position(this), false));
                         } else {
                             // the last element in contentList is a glue;
                             // it is a feasible breakpoint, there is no need to add
@@ -277,9 +302,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
                         //Avoid NoSuchElementException below (happens with empty blocks)
                         continue;
                     }
-                    if (((KnuthElement) returnedList.getLast()).isPenalty()
-                            && ((KnuthPenalty) returnedList.getLast()).getP() 
-                                    == -KnuthElement.INFINITE) {
+                    if (((ListElement)returnedList.getLast()).isForcedBreak()) {
                         // a descendant of this block has break-after
                         if (curLM.isFinished()) {
                             // there is no other content in this block;
@@ -330,7 +353,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
         }
         addKnuthElementsForBorderPaddingAfter(returnList);
         addKnuthElementsForSpaceAfter(returnList, alignment);
-        addKnuthElementsForBreakAfter(returnList);
+        addKnuthElementsForBreakAfter(returnList, context);
 
         setFinished(true);
         return returnList;
@@ -544,9 +567,9 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
                 }
                 if (returnedList != null) {
                     bclm.wrapPositionElements(returnedList, returnList);
-                    //returnList.addAll(returnedList);
                 }
             }
+            SpaceResolver.resolveElementList(returnList);
             setFinished(true);
             return returnList;
         }
@@ -767,9 +790,10 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
             }
     
             // if adjusted space before
-            if (bSpaceBefore) {
-                addBlockSpacing(0, new MinOptMax(adjustedSpaceBefore));
-            }
+//            if (bSpaceBefore) {
+//                addBlockSpacing(0, new MinOptMax(adjustedSpaceBefore));
+//            }
+            //addBlockSpacing(0, effSpaceBefore);
     
             while ((childLM = childPosIter.getNextChildLM()) != null) {
                 // set last area flag
@@ -781,9 +805,10 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
             }
         } else {
             // if adjusted space before
-            if (bSpaceBefore) {
-                addBlockSpacing(0, new MinOptMax(adjustedSpaceBefore));
-            }
+//            if (bSpaceBefore) {
+//                addBlockSpacing(0, new MinOptMax(adjustedSpaceBefore));
+//            }
+            //addBlockSpacing(0, effSpaceBefore);
             //Add child areas inside the reference area
             bcpos.getBreaker().addContainedAreas();
         }
@@ -795,15 +820,19 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
             getCurrentPV().addMarkers(markers, false, isFirst(firstPos), isLast(lastPos));
         }
 
+        TraitSetter.addSpaceBeforeAfter(viewportBlockArea, layoutContext.getSpaceAdjust(), 
+                effSpaceBefore, effSpaceAfter);
         flush();
 
         // if adjusted space after
-        if (bSpaceAfter) {
-            addBlockSpacing(0, new MinOptMax(adjustedSpaceAfter));
-        }
+//        if (bSpaceAfter) {
+//            addBlockSpacing(0, new MinOptMax(adjustedSpaceAfter));
+//        }
+        //addBlockSpacing(0, effSpaceAfter);
 
         viewportBlockArea = null;
         referenceArea = null;
+        resetSpaces();
     }
     
     /**
@@ -826,7 +855,11 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
 
             TraitSetter.setProducerID(viewportBlockArea, getBlockContainerFO().getId());
             TraitSetter.addBorders(viewportBlockArea, 
-                    getBlockContainerFO().getCommonBorderPaddingBackground(), this);
+                    getBlockContainerFO().getCommonBorderPaddingBackground(), 
+                    discardBorderBefore, discardBorderAfter, false, false, this);
+            TraitSetter.addPadding(viewportBlockArea, 
+                    getBlockContainerFO().getCommonBorderPaddingBackground(), 
+                    discardPaddingBefore, discardPaddingAfter, false, false, this);
             // TraitSetter.addBackground(viewportBlockArea, 
             //        getBlockContainerFO().getCommonBorderPaddingBackground(),
             //        this);
@@ -982,6 +1015,51 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
     public boolean getGeneratesBlockArea() {
         return true;
     }
-   
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifySpace(RelSide side, MinOptMax effectiveLength) {
+        if (RelSide.BEFORE == side) {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceBefore + "-> " + effectiveLength);
+            }
+            this.effSpaceBefore = effectiveLength;
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceAfter + "-> " + effectiveLength);
+            }
+            this.effSpaceAfter = effectiveLength;
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyBorder(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardBorderBefore = true;
+            } else {
+                this.discardBorderAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Border " + side + " -> " + effectiveLength);
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyPadding(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardPaddingBefore = true;
+            } else {
+                this.discardPaddingAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Padding " + side + " -> " + effectiveLength);
+        }
+    }
+
 }
 
index d353727e453496e96e7ea9ff24e8a2fae52d91b2..11ca67d03ceb45b65d547bcfc149d56139c9bbb2 100644 (file)
@@ -35,7 +35,8 @@ import org.apache.fop.traits.SpaceVal;
 /**
  * LayoutManager for a block FO.
  */
-public class BlockLayoutManager extends BlockStackingLayoutManager {
+public class BlockLayoutManager extends BlockStackingLayoutManager 
+            implements ConditionalElementListener {
     
     private Block curBlockArea;
 
@@ -46,6 +47,13 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
     private Length lineHeight;
     private int follow = 2000;
     private int middleShift = 0;
+    
+    private boolean discardBorderBefore;
+    private boolean discardBorderAfter;
+    private boolean discardPaddingBefore;
+    private boolean discardPaddingAfter;
+    private MinOptMax effSpaceBefore;
+    private MinOptMax effSpaceAfter;
 
     /** The list of child BreakPoss instances. */
     protected List childBreaks = new java.util.ArrayList();
@@ -87,6 +95,21 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
         }
     }
 
+    /** @see org.apache.fop.layoutmgr.BlockStackingLayoutManager */
+    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+        resetSpaces(); 
+        return super.getNextKnuthElements(context, alignment);
+    }
+   
+    private void resetSpaces() {
+        this.discardBorderBefore = false;        
+        this.discardBorderAfter = false;        
+        this.discardPaddingBefore = false;        
+        this.discardPaddingAfter = false;
+        this.effSpaceBefore = foSpaceBefore;
+        this.effSpaceAfter = foSpaceAfter;
+    }
+    
     /**
      * Proxy iterator for Block LM.
      * This iterator creates and holds the complete list
@@ -362,8 +385,9 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
         }
 
         // if adjusted space before
-        double adjust = layoutContext.getSpaceAdjust();
-        addBlockSpacing(adjust, foSpaceBefore);
+        //double adjust = layoutContext.getSpaceAdjust();
+        //addBlockSpacing(adjust, foSpaceBefore);
+        //addBlockSpacing(adjust, effSpaceBefore);
         foSpaceBefore = null;
         //if (bSpaceBefore) {
         //    addBlockSpacing(0, new MinOptMax(adjustedSpaceBefore));
@@ -385,15 +409,19 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
             getCurrentPV().addMarkers(markers, false, isFirst(firstPos), isLast(lastPos));
         }
 
+        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(), 
+                effSpaceBefore, effSpaceAfter);
         flush();
 
         // if adjusted space after
-        addBlockSpacing(adjust, foSpaceAfter);
+        //addBlockSpacing(adjust, foSpaceAfter);
+        //addBlockSpacing(adjust, effSpaceAfter);
         //if (bSpaceAfter) {
         //    addBlockSpacing(0, new MinOptMax(adjustedSpaceAfter));
         //}
 
         curBlockArea = null;
+        resetSpaces();
     }
 
     /**
@@ -426,7 +454,11 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
             // set traits
             TraitSetter.setProducerID(curBlockArea, getBlockFO().getId());
             TraitSetter.addBorders(curBlockArea, 
-                    getBlockFO().getCommonBorderPaddingBackground(), this);
+                    getBlockFO().getCommonBorderPaddingBackground(), 
+                    discardBorderBefore, discardBorderAfter, false, false, this);
+            TraitSetter.addPadding(curBlockArea, 
+                    getBlockFO().getCommonBorderPaddingBackground(), 
+                    discardPaddingBefore, discardPaddingAfter, false, false, this);
             TraitSetter.addMargins(curBlockArea,
                     getBlockFO().getCommonBorderPaddingBackground(), 
                     getBlockFO().getCommonMarginBlock(),
@@ -533,6 +565,51 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
     public boolean getGeneratesBlockArea() {
         return true;
     }
-   
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifySpace(RelSide side, MinOptMax effectiveLength) {
+        if (RelSide.BEFORE == side) {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceBefore + "-> " + effectiveLength);
+            }
+            this.effSpaceBefore = effectiveLength;
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceAfter + "-> " + effectiveLength);
+            }
+            this.effSpaceAfter = effectiveLength;
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyBorder(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardBorderBefore = true;
+            } else {
+                this.discardBorderAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Border " + side + " -> " + effectiveLength);
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyPadding(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardPaddingBefore = true;
+            } else {
+                this.discardPaddingAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Padding " + side + " -> " + effectiveLength);
+        }
+    }
+
 }
 
index 084101ce4c0e923c5619e21fae8fc140062f66b3..fb0df12cf52e010b81e961f7ca606089af827b68 100644 (file)
@@ -121,15 +121,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
      * @param minoptmax the min/opt/max value of the spacing
      */
     public void addBlockSpacing(double adjust, MinOptMax minoptmax) {
-        if (minoptmax == null) {
-            return;
-        }
-        int sp = minoptmax.opt;
-        if (adjust > 0) {
-            sp = sp + (int)(adjust * (minoptmax.max - minoptmax.opt));
-        } else {
-            sp = sp + (int)(adjust * (minoptmax.opt - minoptmax.min));
-        }
+        int sp = TraitSetter.getEffectiveSpace(adjust, minoptmax);
         if (sp != 0) {
             Block spacer = new Block();
             spacer.setBPD(sp);
@@ -232,7 +224,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
 
         if (!bBreakBeforeServed) {
             try {
-                if (addKnuthElementsForBreakBefore(returnList)) {
+                if (addKnuthElementsForBreakBefore(returnList, context)) {
                     return returnList;
                 }
             } finally {
@@ -246,9 +238,13 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
         }
         
         addKnuthElementsForBorderPaddingBefore(returnList);
+
+        //Spaces, border and padding to be repeated at each break
+        addPendingMarks(context);
         
         while ((curLM = (BlockLevelLayoutManager) getChildLM()) != null) {
             LayoutContext childLC = new LayoutContext(0);
+            childLC.copyPendingMarksFrom(context);
             if (curLM instanceof LineLayoutManager) {
                 // curLM is a LineLayoutManager
                 // set stackLimit for lines
@@ -311,17 +307,27 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                         childLC.setFlags(LayoutContext.KEEP_WITH_PREVIOUS_PENDING, false);
                         // add an infinite penalty to forbid a break between
                         // blocks
+                        contentList.add(new BreakElement(
+                                new Position(this), KnuthElement.INFINITE, context));
+                        /*
                         contentList.add(new KnuthPenalty(0,
                                 KnuthElement.INFINITE, false,
                                 new Position(this), false));
-                    } else if (!((KnuthElement) contentList.getLast()).isGlue()) {
+                        */
+                    } else if (!((ListElement) contentList.getLast()).isGlue()) {
                         // add a null penalty to allow a break between blocks
+                        contentList.add(new BreakElement(
+                                new Position(this), 0, context));
+                        /*
                         contentList.add(new KnuthPenalty(0, 0, false,
-                                new Position(this), false));
+                                new Position(this), false));*/
                     } else {
                         // the last element in contentList is a glue;
                         // it is a feasible breakpoint, there is no need to add
                         // a penalty
+                        log.warn("glue-type break possibility not handled properly, yet");
+                        //TODO Does this happen? If yes, need to deal with border and padding
+                        //at the break possibility
                     }
                 }
                 if (returnedList == null || returnedList.size() == 0) {
@@ -329,9 +335,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                     continue;
                 }
                 contentList.addAll(returnedList);
-                if (((KnuthElement) returnedList.getLast()).isPenalty()
-                        && ((KnuthPenalty) returnedList.getLast()).getP() 
-                                == -KnuthElement.INFINITE) {
+                if (((ListElement) returnedList.getLast()).isForcedBreak()) {
                     // a descendant of this block has break-after
                     if (curLM.isFinished()) {
                         // there is no other content in this block;
@@ -382,7 +386,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
 
         addKnuthElementsForBorderPaddingAfter(returnList);
         addKnuthElementsForSpaceAfter(returnList, alignment);
-        addKnuthElementsForBreakAfter(returnList);
+        addKnuthElementsForBreakAfter(returnList, context);
 
         if (mustKeepWithNext()) {
             context.setFlags(LayoutContext.KEEP_WITH_NEXT_PENDING);
@@ -741,27 +745,143 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
     }
 
     /**
-     * Creates Knuth elements for before border padding and adds them to the return list.
-     * @param returnList return list to add the additional elements to
+     * Adds the unresolved elements for border and padding to a layout context so break
+     * possibilities can be properly constructed.
+     * @param context the layout context
      */
-    protected void addKnuthElementsForBorderPaddingBefore(LinkedList returnList/*, 
-            Position returnPosition*/) {
-        //Border and Padding (before)
-        CommonBorderPaddingBackground borderAndPadding = null;
+    protected void addPendingMarks(LayoutContext context) {
+        SpaceProperty spaceBefore = getSpaceBeforeProperty();
+        if (spaceBefore != null
+                   && !(spaceBefore.getMinimum(this).getLength().getValue(this) == 0 
+                        && spaceBefore.getMaximum(this).getLength().getValue(this) == 0)) {
+            context.addPendingBeforeMark(new SpaceElement(getAuxiliaryPosition(), spaceBefore,
+                    RelSide.BEFORE, 
+                    true, false, this));
+        }
+        SpaceProperty spaceAfter = getSpaceAfterProperty();
+        if (spaceAfter != null
+                && !(spaceAfter.getMinimum(this).getLength().getValue(this) == 0 
+                     && spaceAfter.getMaximum(this).getLength().getValue(this) == 0)) {
+            context.addPendingAfterMark(new SpaceElement(getAuxiliaryPosition(), spaceAfter,
+                    RelSide.AFTER, 
+                    false, true, this));
+        }
+        CommonBorderPaddingBackground borderAndPadding = getBorderPaddingBackground();
+        if (borderAndPadding != null) {
+            if (borderAndPadding.getBorderBeforeWidth(false) > 0) {
+                context.addPendingBeforeMark(new BorderElement(
+                        getAuxiliaryPosition(), 
+                        borderAndPadding.getBorderInfo(
+                                CommonBorderPaddingBackground.BEFORE).getWidth(),
+                                RelSide.BEFORE,
+                                false, false, this));
+            }
+            if (borderAndPadding.getPaddingBefore(false, this) > 0) {
+                context.addPendingBeforeMark(new PaddingElement(
+                        getAuxiliaryPosition(),
+                        borderAndPadding.getPaddingLengthProperty(
+                                CommonBorderPaddingBackground.BEFORE),
+                                RelSide.BEFORE, 
+                                false, false, this));
+            }
+            if (borderAndPadding.getBorderAfterWidth(false) > 0) {
+                context.addPendingAfterMark(new BorderElement(
+                        getAuxiliaryPosition(), 
+                        borderAndPadding.getBorderInfo(
+                                CommonBorderPaddingBackground.AFTER).getWidth(),
+                                RelSide.AFTER, 
+                                false, false, this));
+            }
+            if (borderAndPadding.getPaddingAfter(false, this) > 0) {
+                context.addPendingAfterMark(new PaddingElement(
+                        getAuxiliaryPosition(),
+                        borderAndPadding.getPaddingLengthProperty(
+                                CommonBorderPaddingBackground.AFTER),
+                                RelSide.AFTER, 
+                                false, false, this));
+            }
+        }
+    }
+    
+    /** @return the border, padding and background info structure */
+    private CommonBorderPaddingBackground getBorderPaddingBackground() {
         if (fobj instanceof org.apache.fop.fo.flow.Block) {
-            borderAndPadding = ((org.apache.fop.fo.flow.Block)fobj)
+            return ((org.apache.fop.fo.flow.Block)fobj)
                 .getCommonBorderPaddingBackground();
         } else if (fobj instanceof org.apache.fop.fo.flow.BlockContainer) {
-            borderAndPadding = ((org.apache.fop.fo.flow.BlockContainer)fobj)
+            return ((org.apache.fop.fo.flow.BlockContainer)fobj)
                 .getCommonBorderPaddingBackground();
+        } else {
+            return null;
+        }
+    }
+    
+    /** @return the space-before property */
+    private SpaceProperty getSpaceBeforeProperty() {
+        if (fobj instanceof org.apache.fop.fo.flow.Block) {
+            return ((org.apache.fop.fo.flow.Block)fobj)
+                .getCommonMarginBlock().spaceBefore;
+        } else if (fobj instanceof org.apache.fop.fo.flow.BlockContainer) {
+            return ((org.apache.fop.fo.flow.BlockContainer)fobj)
+                .getCommonMarginBlock().spaceBefore;
+        } else if (fobj instanceof org.apache.fop.fo.flow.ListBlock) {
+            return ((org.apache.fop.fo.flow.ListBlock)fobj)
+                .getCommonMarginBlock().spaceBefore;
+        } else if (fobj instanceof org.apache.fop.fo.flow.ListItem) {
+            return ((org.apache.fop.fo.flow.ListItem)fobj)
+                .getCommonMarginBlock().spaceBefore;
+        } else {
+            return null;
+        }
+    }
+    
+    /** @return the space-after property */
+    private SpaceProperty getSpaceAfterProperty() {
+        if (fobj instanceof org.apache.fop.fo.flow.Block) {
+            return ((org.apache.fop.fo.flow.Block)fobj)
+                .getCommonMarginBlock().spaceAfter;
+        } else if (fobj instanceof org.apache.fop.fo.flow.BlockContainer) {
+            return ((org.apache.fop.fo.flow.BlockContainer)fobj)
+                .getCommonMarginBlock().spaceAfter;
+        } else if (fobj instanceof org.apache.fop.fo.flow.ListBlock) {
+            return ((org.apache.fop.fo.flow.ListBlock)fobj)
+                .getCommonMarginBlock().spaceAfter;
+        } else if (fobj instanceof org.apache.fop.fo.flow.ListItem) {
+            return ((org.apache.fop.fo.flow.ListItem)fobj)
+                .getCommonMarginBlock().spaceAfter;
+        } else {
+            return null;
         }
+    }
+    
+    /**
+     * Creates Knuth elements for before border padding and adds them to the return list.
+     * @param returnList return list to add the additional elements to
+     */
+    protected void addKnuthElementsForBorderPaddingBefore(LinkedList returnList) {
+        //Border and Padding (before)
+        CommonBorderPaddingBackground borderAndPadding = getBorderPaddingBackground();
         if (borderAndPadding != null) {
+            if (borderAndPadding.getBorderBeforeWidth(false) > 0) {
+                returnList.add(new BorderElement(
+                        getAuxiliaryPosition(), 
+                        borderAndPadding.getBorderInfo(CommonBorderPaddingBackground.BEFORE)
+                            .getWidth(), RelSide.BEFORE, true, false, this));
+            }
+            if (borderAndPadding.getPaddingBefore(false, this) > 0) {
+                returnList.add(new PaddingElement(
+                        getAuxiliaryPosition(),
+                        borderAndPadding.getPaddingLengthProperty(
+                                CommonBorderPaddingBackground.BEFORE), 
+                                RelSide.BEFORE, true, false, this));
+            }
             //TODO Handle conditionality
+            /*
             int bpBefore = borderAndPadding.getBorderBeforeWidth(false)
                          + borderAndPadding.getPaddingBefore(false, this);
             if (bpBefore > 0) {
                 returnList.add(new KnuthBox(bpBefore, getAuxiliaryPosition(), true));
-            }
+            }*/
         }
     }
 
@@ -769,24 +889,29 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
      * Creates Knuth elements for after border padding and adds them to the return list.
      * @param returnList return list to add the additional elements to
      */
-    protected void addKnuthElementsForBorderPaddingAfter(LinkedList returnList/*, 
-            Position returnPosition*/) {
+    protected void addKnuthElementsForBorderPaddingAfter(LinkedList returnList) {
         //Border and Padding (after)
-        CommonBorderPaddingBackground borderAndPadding = null;
-        if (fobj instanceof org.apache.fop.fo.flow.Block) {
-            borderAndPadding = ((org.apache.fop.fo.flow.Block)fobj)
-                .getCommonBorderPaddingBackground();
-        } else if (fobj instanceof org.apache.fop.fo.flow.BlockContainer) {
-            borderAndPadding = ((org.apache.fop.fo.flow.BlockContainer)fobj)
-                .getCommonBorderPaddingBackground();
-        }
+        CommonBorderPaddingBackground borderAndPadding = getBorderPaddingBackground();
         if (borderAndPadding != null) {
+            if (borderAndPadding.getPaddingAfter(false, this) > 0) {
+                returnList.add(new PaddingElement(
+                        getAuxiliaryPosition(),
+                        borderAndPadding.getPaddingLengthProperty(
+                                CommonBorderPaddingBackground.AFTER), RelSide.AFTER, false, true, this));
+            }
+            if (borderAndPadding.getBorderAfterWidth(false) > 0) {
+                returnList.add(new BorderElement(
+                        getAuxiliaryPosition(), 
+                        borderAndPadding.getBorderInfo(CommonBorderPaddingBackground.AFTER)
+                            .getWidth(), RelSide.AFTER, false, true, this));
+            }
             //TODO Handle conditionality
+            /*
             int bpAfter = borderAndPadding.getBorderAfterWidth(false)
                         + borderAndPadding.getPaddingAfter(false, this);
             if (bpAfter > 0) {
                 returnList.add(new KnuthBox(bpAfter, getAuxiliaryPosition(), true));
-            }
+            }*/
         }
     }
 
@@ -795,8 +920,8 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
      * @param returnList return list to add the additional elements to
      * @return true if an element has been added due to a break-before.
      */
-    protected boolean addKnuthElementsForBreakBefore(LinkedList returnList/*
-            Position returnPosition*/) {
+    protected boolean addKnuthElementsForBreakBefore(LinkedList returnList, 
+            LayoutContext context) {
         int breakBefore = -1;
         if (fobj instanceof org.apache.fop.fo.flow.Block) {
             breakBefore = ((org.apache.fop.fo.flow.Block) fobj).getBreakBefore();
@@ -810,8 +935,10 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                 || breakBefore == EN_EVEN_PAGE 
                 || breakBefore == EN_ODD_PAGE) {
             // return a penalty element, representing a forced page break
-            returnList.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false,
-                    breakBefore, getAuxiliaryPosition(), false));
+            returnList.add(new BreakElement(getAuxiliaryPosition(), 
+                    0, -KnuthElement.INFINITE, breakBefore, context));
+            //returnList.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false,
+            //        breakBefore, getAuxiliaryPosition(), false));
             return true;
         } else {
             return false;
@@ -823,8 +950,8 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
      * @param returnList return list to add the additional elements to
      * @return true if an element has been added due to a break-after.
      */
-    protected boolean addKnuthElementsForBreakAfter(LinkedList returnList/*
-            Position returnPosition*/) {
+    protected boolean addKnuthElementsForBreakAfter(LinkedList returnList, 
+            LayoutContext context) {
         int breakAfter = -1;
         if (fobj instanceof org.apache.fop.fo.flow.Block) {
             breakAfter = ((org.apache.fop.fo.flow.Block) fobj).getBreakAfter();
@@ -838,8 +965,10 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                 || breakAfter == EN_EVEN_PAGE
                 || breakAfter == EN_ODD_PAGE) {
             // add a penalty element, representing a forced page break
-            returnList.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false,
-                    breakAfter, getAuxiliaryPosition(), false));
+            returnList.add(new BreakElement(getAuxiliaryPosition(), 
+                    0, -KnuthElement.INFINITE, breakAfter, context));
+            //returnList.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false,
+            //        breakAfter, getAuxiliaryPosition(), false));
             return true;
         } else {
             return false;
@@ -853,21 +982,16 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
      */
     protected void addKnuthElementsForSpaceBefore(LinkedList returnList/*, 
             Position returnPosition*/, int alignment) {
-        SpaceProperty spaceBefore = null;
-        if (fobj instanceof org.apache.fop.fo.flow.Block) {
-            spaceBefore = ((org.apache.fop.fo.flow.Block)fobj)
-                .getCommonMarginBlock().spaceBefore;
-        } else if (fobj instanceof org.apache.fop.fo.flow.BlockContainer) {
-            spaceBefore = ((org.apache.fop.fo.flow.BlockContainer)fobj)
-                .getCommonMarginBlock().spaceBefore;
-        } else if (fobj instanceof org.apache.fop.fo.flow.ListBlock) {
-            spaceBefore = ((org.apache.fop.fo.flow.ListBlock)fobj)
-                .getCommonMarginBlock().spaceBefore;
-        } else if (fobj instanceof org.apache.fop.fo.flow.ListItem) {
-            spaceBefore = ((org.apache.fop.fo.flow.ListItem)fobj)
-                .getCommonMarginBlock().spaceBefore;
-        }
+        SpaceProperty spaceBefore = getSpaceBeforeProperty();
         // append elements representing space-before
+        if (spaceBefore != null
+                   && !(spaceBefore.getMinimum(this).getLength().getValue(this) == 0 
+                        && spaceBefore.getMaximum(this).getLength().getValue(this) == 0)) {
+            returnList.add(new SpaceElement(getAuxiliaryPosition(), spaceBefore,
+                    RelSide.BEFORE, 
+                    true, false, this));
+        }
+        /*
         if (bpUnit > 0
                 || spaceBefore != null
                    && !(spaceBefore.getMinimum(this).getLength().getValue(this) == 0 
@@ -882,7 +1006,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                 returnList.add(new KnuthGlue(0, 0, 0,
                         BlockLevelLayoutManager.SPACE_BEFORE_ADJUSTMENT, 
                         getAuxiliaryPosition(), true));
-            } else /*if (alignment == EN_JUSTIFY)*/ {
+            } else { //if (alignment == EN_JUSTIFY) {
                 returnList.add(new KnuthGlue(
                         spaceBefore.getOptimum(this).getLength().getValue(this),
                         spaceBefore.getMaximum(this).getLength().getValue(this)
@@ -891,13 +1015,13 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                                 - spaceBefore.getMinimum(this).getLength().getValue(this),
                         BlockLevelLayoutManager.SPACE_BEFORE_ADJUSTMENT, 
                         getAuxiliaryPosition(), true));
-            } /*else {
-                returnList.add(new KnuthGlue(
-                        spaceBefore.getOptimum().getLength().getValue(this), 
-                        0, 0, BlockLevelLayoutManager.SPACE_BEFORE_ADJUSTMENT,
-                        returnPosition, true));
-            }*/
-        }
+//            } else {
+//                returnList.add(new KnuthGlue(
+//                        spaceBefore.getOptimum().getLength().getValue(this), 
+//                        0, 0, BlockLevelLayoutManager.SPACE_BEFORE_ADJUSTMENT,
+//                        returnPosition, true));
+            }
+        }*/
     }
 
     /**
@@ -907,21 +1031,16 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
      */
     protected void addKnuthElementsForSpaceAfter(LinkedList returnList/*, Position returnPosition*/, 
                 int alignment) {
-        SpaceProperty spaceAfter = null;
-        if (fobj instanceof org.apache.fop.fo.flow.Block) {
-            spaceAfter = ((org.apache.fop.fo.flow.Block)fobj)
-                .getCommonMarginBlock().spaceAfter;
-        } else if (fobj instanceof org.apache.fop.fo.flow.BlockContainer) {
-            spaceAfter = ((org.apache.fop.fo.flow.BlockContainer)fobj)
-                .getCommonMarginBlock().spaceAfter;
-        } else if (fobj instanceof org.apache.fop.fo.flow.ListBlock) {
-            spaceAfter = ((org.apache.fop.fo.flow.ListBlock)fobj)
-                .getCommonMarginBlock().spaceAfter;
-        } else if (fobj instanceof org.apache.fop.fo.flow.ListItem) {
-            spaceAfter = ((org.apache.fop.fo.flow.ListItem)fobj)
-                .getCommonMarginBlock().spaceAfter;
-        }
+        SpaceProperty spaceAfter = getSpaceAfterProperty();
         // append elements representing space-after
+        if (spaceAfter != null
+                && !(spaceAfter.getMinimum(this).getLength().getValue(this) == 0 
+                     && spaceAfter.getMaximum(this).getLength().getValue(this) == 0)) {
+            returnList.add(new SpaceElement(getAuxiliaryPosition(), spaceAfter,
+                    RelSide.AFTER, 
+                    false, true, this));
+        }
+        /*
         if (bpUnit > 0
                 || spaceAfter != null
                    && !(spaceAfter.getMinimum(this).getLength().getValue(this) == 0 
@@ -934,7 +1053,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                 returnList.add(new KnuthGlue(0, 0, 0, 
                         BlockLevelLayoutManager.SPACE_AFTER_ADJUSTMENT,
                         getAuxiliaryPosition(), true));
-            } else /*if (alignment == EN_JUSTIFY)*/ {
+            } else { //if (alignment == EN_JUSTIFY) {
                 returnList.add(new KnuthGlue(
                         spaceAfter.getOptimum(this).getLength().getValue(this),
                         spaceAfter.getMaximum(this).getLength().getValue(this)
@@ -943,16 +1062,16 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                                 - spaceAfter.getMinimum(this).getLength().getValue(this),
                         BlockLevelLayoutManager.SPACE_AFTER_ADJUSTMENT, getAuxiliaryPosition(),
                         (!spaceAfter.getSpace().isDiscard()) ? false : true));
-            } /*else {
-                returnList.add(new KnuthGlue(
-                        spaceAfter.getOptimum().getLength().getValue(this), 0, 0,
-                        BlockLevelLayoutManager.SPACE_AFTER_ADJUSTMENT, returnPosition,
-                        (!spaceAfter.getSpace().isDiscard()) ? false : true));
-            }*/
+//            } else {
+//                returnList.add(new KnuthGlue(
+//                        spaceAfter.getOptimum().getLength().getValue(this), 0, 0,
+//                        BlockLevelLayoutManager.SPACE_AFTER_ADJUSTMENT, returnPosition,
+//                        (!spaceAfter.getSpace().isDiscard()) ? false : true));
+            }
             if (spaceAfter != null && !spaceAfter.getSpace().isDiscard()) {
                 returnList.add(new KnuthBox(0, getAuxiliaryPosition(), true));
             }
-        }
+        }*/
     }
 
     protected LinkedList createUnitElements(LinkedList oldList) {
@@ -1330,8 +1449,8 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
           
         ListIterator listIter = sourceList.listIterator();
         while (listIter.hasNext()) {
-            KnuthElement tempElement;
-            tempElement = (KnuthElement) listIter.next();
+            ListElement tempElement;
+            tempElement = (ListElement) listIter.next();
             if (force || tempElement.getLayoutManager() != this) {
                 tempElement.setPosition(notifyPos(new NonLeafPosition(this,
                         tempElement.getPosition())));
diff --git a/src/java/org/apache/fop/layoutmgr/BorderElement.java b/src/java/org/apache/fop/layoutmgr/BorderElement.java
new file mode 100644 (file)
index 0000000..691fcab
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import org.apache.fop.datatypes.PercentBaseContext;
+import org.apache.fop.fo.properties.CondLengthProperty;
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This represents an unresolved border element.
+ */
+public class BorderElement extends BorderOrPaddingElement {
+
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param side the side to which this space element applies.
+     * @param condLength the length-conditional property for a border or padding specification
+     * @param isFirst true if this is a padding- or border-before of the first area generated.
+     * @param isLast true if this is a padding- or border-after of the last area generated.
+     * @param context the property evaluation context
+     */
+    public BorderElement(Position position, CondLengthProperty condLength,
+            RelSide side,
+            boolean isFirst, boolean isLast, PercentBaseContext context) {
+        super(position, condLength, side, isFirst, isLast, context);
+    }
+    
+    /** @see org.apache.fop.layoutmgr.UnresolvedListElementWithLength */
+    public void notifyLayoutManager(MinOptMax effectiveLength) {
+        LayoutManager lm = getOriginatingLayoutManager();
+        if (lm instanceof ConditionalElementListener) {
+            ((ConditionalElementListener)lm).notifyBorder(
+                    getSide(), effectiveLength);
+        } else {
+            log.warn("Cannot notify LM. It does not implement ConditionalElementListener: "
+                    + lm.getClass().getName());
+        }
+    }
+    
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        StringBuffer sb = new StringBuffer("Border[");
+        sb.append(super.toString());
+        sb.append("]");
+        return sb.toString();
+    }
+    
+}
diff --git a/src/java/org/apache/fop/layoutmgr/BorderOrPaddingElement.java b/src/java/org/apache/fop/layoutmgr/BorderOrPaddingElement.java
new file mode 100644 (file)
index 0000000..2e4dc31
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import org.apache.fop.datatypes.PercentBaseContext;
+import org.apache.fop.fo.properties.CondLengthProperty;
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This class represents an unresolved border or padding element.
+ */
+public abstract class BorderOrPaddingElement extends UnresolvedListElementWithLength {
+
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param side the side to which this space element applies.
+     * @param condLength the length-conditional property for a border or padding specification
+     * @param isFirst true if this is a padding- or border-before of the first area generated.
+     * @param isLast true if this is a padding- or border-after of the last area generated.
+     * @param context the property evaluation context
+     */
+    public BorderOrPaddingElement(Position position, CondLengthProperty condLength,
+            RelSide side,
+            boolean isFirst, boolean isLast, PercentBaseContext context) {
+        super(position,
+                new MinOptMax(condLength.getLength().getValue(context)), side, 
+                        condLength.isDiscard(), isFirst, isLast);
+    }
+    
+    /** @see org.apache.fop.layoutmgr.UnresolvedListElementWithLength */
+    public abstract void notifyLayoutManager(MinOptMax effectiveLength);
+        
+}
diff --git a/src/java/org/apache/fop/layoutmgr/BreakElement.java b/src/java/org/apache/fop/layoutmgr/BreakElement.java
new file mode 100644 (file)
index 0000000..d47e021
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import java.util.List;
+
+import org.apache.fop.fo.Constants;
+
+/**
+ * This class represents an unresolved break possibility.
+ */
+public class BreakElement extends UnresolvedListElement {
+
+    private int penaltyWidth;
+    private int penaltyValue;
+    private int breakClass = -1;
+    private List pendingBeforeMarks;
+    private List pendingAfterMarks;
+    
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param penaltyValue the penalty value for the penalty element to be constructed
+     * @param context the layout context which contains the pending conditional elements
+     */
+    public BreakElement(Position position, int penaltyValue, LayoutContext context) {
+        this(position, 0, penaltyValue, -1, context);
+    }
+    
+    /**
+     * Constructor for hard breaks.
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param penaltyWidth the penalty width
+     * @param penaltyValue the penalty value for the penalty element to be constructed
+     * @param breakClass the break class of this penalty (one of the break-* constants)
+     * @param context the layout context which contains the pending conditional elements
+     */
+    public BreakElement(Position position, int penaltyWidth, int penaltyValue, 
+                int breakClass, LayoutContext context) {
+        super(position);
+        this.penaltyWidth = penaltyWidth;
+        this.penaltyValue = penaltyValue;
+        this.breakClass = breakClass;
+        this.pendingBeforeMarks = context.getPendingBeforeMarks();
+        this.pendingAfterMarks = context.getPendingAfterMarks();
+    }
+    
+    /** @see org.apache.fop.layoutmgr.UnresolvedListElement#isConditional() */
+    public boolean isConditional() {
+        return false; //Does not really apply here
+    }
+
+    /** @return the penalty width */
+    public int getPenaltyWidth() {
+        return this.penaltyWidth;
+    }
+    
+    /** @return the penalty value */
+    public int getPenaltyValue() {
+        return this.penaltyValue;
+    }
+    
+    /** @see org.apache.fop.layoutmgr.ListElement#isForcedBreak() */
+    public boolean isForcedBreak() {
+        return penaltyValue == -KnuthElement.INFINITE;
+    }
+    
+    /** @return the break class of this penalty (one of the break-* constants) */
+    public int getBreakClass() {
+        return breakClass;
+    }
+    
+    /** @return the pending border and padding elements at the before edge */
+    public List getPendingBeforeMarks() {
+        return this.pendingBeforeMarks;
+    }
+    
+    /** @return the pending border and padding elements at the after edge */
+    public List getPendingAfterMarks() {
+        return this.pendingAfterMarks;
+    }
+    
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("BreakPossibility[p:");
+        sb.append(this.penaltyValue);
+        if (isForcedBreak()) {
+            sb.append(" (forced break");
+            switch (getBreakClass()) {
+            case Constants.EN_PAGE:
+                sb.append(", page");
+                break;
+            case Constants.EN_COLUMN:
+                sb.append(", column");
+                break;
+            case Constants.EN_EVEN_PAGE:
+                sb.append(", even page");
+                break;
+            case Constants.EN_ODD_PAGE:
+                sb.append(", odd page");
+                break;
+            default:
+            }
+            sb.append(")");
+        }
+        sb.append("]");
+        return sb.toString();
+    }
+
+}
diff --git a/src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java b/src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java
new file mode 100644 (file)
index 0000000..3cc4be6
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This interface is used to notify layout managers about the situation around spaces, borders
+ * and padding just before the addArea() method is called when a part is being painted.
+ */
+public interface ConditionalElementListener {
+
+    /**
+     * Notifies the layout manager about the effective length of its space.
+     * @param side the side to which the space applies
+     * @param effectiveLength the effective length after space-resolution (null means zero length)
+     */
+    void notifySpace(RelSide side, MinOptMax effectiveLength);
+
+    /**
+     * Notifies the layout manager about the effective length/width of its border.
+     * @param side the side to which the border applies
+     * @param effectiveLength the effective length in the current break situation
+     *                        (null means zero length)
+     */
+    void notifyBorder(RelSide side, MinOptMax effectiveLength);
+
+    /**
+     * Notifies the layout manager about the effective length/width of its padding.
+     * @param side the side to which the padding applies
+     * @param effectiveLength the effective length in the current break situation
+     *                        (null means zero length)
+     */
+    void notifyPadding(RelSide side, MinOptMax effectiveLength);
+    
+}
index c1100d00fa19a1fcba1d4090b3e63e77de77a90b..a606879baa0c76753f8901031e82bbc4e00249da 100644 (file)
@@ -133,4 +133,14 @@ public class ElementListUtils {
         return calcContentLength(elems, 0, elems.size() - 1);
     }
     
+    /**
+     * Indicates whether the given element list ends with a forced break.
+     * @param elems the element list
+     * @return true if the list ends with a forced break
+     */
+    public static boolean endsWithForcedBreak(LinkedList elems) {
+        ListElement last = (ListElement)elems.getLast();
+        return last.isForcedBreak();
+    }
+    
 }
index 37e852cb614bc1125c94cfe04ab3d6deaec6ba21..fc52ce0663a3c14acc2ca1e8839e0de1d988f105 100644 (file)
@@ -84,6 +84,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager
                 log.debug("span change from " + currentSpan + " to " + span);
                 context.signalSpanChange(span);
                 currentSpan = span;
+                SpaceResolver.resolveElementList(returnList);
                 return returnList;
             }
             
@@ -109,10 +110,10 @@ public class FlowLayoutManager extends BlockStackingLayoutManager
             wrapPositionElements(tempList, returnedList);
 
             if (returnedList.size() == 1
-                && ((KnuthElement)returnedList.getFirst()).isPenalty()
-                && ((KnuthPenalty)returnedList.getFirst()).getP() == -KnuthElement.INFINITE) {
+                && ElementListUtils.endsWithForcedBreak(returnedList)) {
                 // a descendant of this flow has break-before
                 returnList.addAll(returnedList);
+                SpaceResolver.resolveElementList(returnList);
                 return returnList;
             } else {
                 if (returnList.size() > 0) {
@@ -123,20 +124,19 @@ public class FlowLayoutManager extends BlockStackingLayoutManager
                         context.setFlags(LayoutContext.KEEP_WITH_NEXT_PENDING, false);
                         childLC.setFlags(LayoutContext.KEEP_WITH_PREVIOUS_PENDING, false);
                         // add an infinite penalty to forbid a break between blocks
-                        returnList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, 
-                                new Position(this), false));
-                    } else if (!((KnuthElement) returnList.getLast()).isGlue()) {
+                        returnList.add(new BreakElement(
+                                new Position(this), KnuthElement.INFINITE, context));
+                    } else if (!((ListElement) returnList.getLast()).isGlue()) {
                         // add a null penalty to allow a break between blocks
-                        returnList.add(new KnuthPenalty(0, 0, false, 
-                                new Position(this), false));
+                        returnList.add(new BreakElement(
+                                new Position(this), 0, context));
                     }
                 }
-                if (returnedList.size() > 0) { // controllare!
+                if (returnedList.size() > 0) {
                     returnList.addAll(returnedList);
-                    if (((KnuthElement)returnedList.getLast()).isPenalty()
-                        && ((KnuthPenalty)returnedList.getLast()).getP() 
-                                == -KnuthElement.INFINITE) {
+                    if (ElementListUtils.endsWithForcedBreak(returnedList)) {
                         // a descendant of this flow has break-after
+                        SpaceResolver.resolveElementList(returnList);
                         return returnList;
                     }
                 }
@@ -148,6 +148,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager
             }
         }
 
+        SpaceResolver.resolveElementList(returnList);
         setFinished(true);
 
         if (returnList.size() > 0) {
index cef81aaab021bea04e5f0ce25568c1c81b40cf56..97d0bbd565e6fac5516fffc285883df0b98508ca 100644 (file)
@@ -26,12 +26,12 @@ package org.apache.fop.layoutmgr;
  * special feature (for example, the additional elements used to represent
  * a space when text alignment is right, left or center).
  */
-public abstract class KnuthElement {
+public abstract class KnuthElement extends ListElement {
 
+    /** The value used as an infinite indicator. */
     public static final int INFINITE = 1000;
 
     private int width;
-    private Position position;
     private boolean bIsAuxiliary;
 
     /**
@@ -43,84 +43,39 @@ public abstract class KnuthElement {
      * @param bAux is this an auxiliary element?
      */
     protected KnuthElement(int w, Position pos, boolean bAux) {
+        super(pos);
         width = w;
-        position = pos;
         bIsAuxiliary = bAux;
     }
 
-    /**
-     * Return true if this element is a KnuthBox.
-     */
-    public boolean isBox() {
-        return false;
-    }
-
-    /**
-     * Return true if this element is a KnuthGlue.
-     */
-    public boolean isGlue() {
-        return false;
-    }
-
-    /**
-     * Return true if this element is a KnuthPenalty.
-     */
-    public boolean isPenalty() {
-        return false;
-    }
-
-    /**
-     * Return true if this element is an auxiliary one.
-     */
+    /** @return true if this element is an auxiliary one. */
     public boolean isAuxiliary() {
         return bIsAuxiliary;
     }
 
-    /**
-     * Return the width of this element.
-     */
+    /** @return the width of this element. */
     public int getW() {
         return width;
     }
 
+    /** @return the penalty value of this element, if applicable. */ 
     public int getP() {
         throw new RuntimeException("Element is not a penalty");
     }
 
+    /** @return the stretch value of this element, if applicable. */ 
     public int getY() {
         throw new RuntimeException("Element is not a glue");
     }
 
+    /** @return the shrink value of this element, if applicable. */ 
     public int getZ() {
         throw new RuntimeException("Element is not a glue");
     }
-
-    public boolean isForcedBreak() {
+    
+    /** @see org.apache.fop.layoutmgr.ListElement#isUnresolvedElement() */
+    public boolean isUnresolvedElement() {
         return false;
     }
 
-    /**
-     * Return the Position stored in this element.
-     */
-    public Position getPosition() {
-        return position;
-    }
-
-    /**
-     * Change the Position stored in this element.
-     */
-    public void setPosition(Position pos) {
-        position = pos;
-    }
-
-    /**
-     * Return the LayoutManager responsible for this element.
-     */
-    public LayoutManager getLayoutManager() {
-        if (position != null) {
-            return position.getLM();
-        } else {
-            return null;
-        }
-    }
 }
index 45ce1889b87c3a408deb99218b1763e5aba1c3ad..e4710b1a16b6e1465ddc208d4789f86144441e3b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +18,9 @@
 
 package org.apache.fop.layoutmgr;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.fop.fo.Constants;
 import org.apache.fop.layoutmgr.inline.HyphContext;
 import org.apache.fop.traits.MinOptMax;
@@ -25,7 +28,7 @@ import org.apache.fop.layoutmgr.inline.AlignmentContext;
 
 
 /**
- * This class is used to pass information to the getNextBreakPoss()
+ * This class is used to pass information to the getNextKnuthElements()
  * method. It is set up by higher level LM and used by lower level LM.
  */
 public class LayoutContext {
@@ -91,6 +94,18 @@ public class LayoutContext {
 
     /** Current pending space-before or space-start from ancestor areas */
     SpaceSpecifier leadingSpace;
+    
+    /**
+     * A list of pending marks (border and padding) on the after edge when a page break occurs. 
+     * May be null.
+     */
+    private List pendingAfterMarks;
+    
+    /**
+     * A list of pending marks (border and padding) on the before edge when a page break occurs. 
+     * May be null.
+     */
+    private List pendingBeforeMarks;
 
     /** Current hyphenation context. May be null. */
     private HyphContext hyphContext = null;
@@ -117,6 +132,10 @@ public class LayoutContext {
     /** Amount of space to reserve at the end of each line */
     private int lineEndBorderAndPaddingWidth = 0;
 
+    /**
+     * Copy constructor for creating child layout contexts.
+     * @param parentLC the parent layout context to copy from
+     */
     public LayoutContext(LayoutContext parentLC) {
         this.flags = parentLC.flags;
         this.refIPD = parentLC.refIPD;
@@ -131,9 +150,14 @@ public class LayoutContext {
         this.alignmentContext = parentLC.alignmentContext;
         this.lineStartBorderAndPaddingWidth = parentLC.lineStartBorderAndPaddingWidth;
         this.lineEndBorderAndPaddingWidth = parentLC.lineEndBorderAndPaddingWidth;
-        // Copy other fields as necessary. Use clone???
+        copyPendingMarksFrom(parentLC);
+        // Copy other fields as necessary.
     }
 
+    /**
+     * Main constructor.
+     * @param flags the initial flags
+     */
     public LayoutContext(int flags) {
         this.flags = flags;
         this.refIPD = 0;
@@ -142,6 +166,15 @@ public class LayoutContext {
         trailingSpace = null;
     }
 
+    public void copyPendingMarksFrom(LayoutContext source) {
+        if (source.pendingAfterMarks != null) {
+            this.pendingAfterMarks = new java.util.ArrayList(source.pendingAfterMarks); 
+        }
+        if (source.pendingBeforeMarks != null) {
+            this.pendingBeforeMarks = new java.util.ArrayList(source.pendingBeforeMarks); 
+        }
+    }
+    
     public void setFlags(int flags) {
         setFlags(flags, true);
     }
@@ -206,6 +239,56 @@ public class LayoutContext {
         return trailingSpace;
     }
 
+    /**
+     * Adds a border or padding element to the pending list which will be used to generate
+     * the right element list for break possibilities. Conditionality resolution will be done
+     * elsewhere.
+     * @param element the border, padding or space element
+     */
+    public void addPendingAfterMark(UnresolvedListElementWithLength element) {
+        if (this.pendingAfterMarks == null) {
+            this.pendingAfterMarks = new java.util.ArrayList();
+        }
+        this.pendingAfterMarks.add(element);
+    }
+    
+    /**
+     * @return the pending border and padding elements at the after edge
+     * @see addPendingAfterMark(BorderOrPaddingElement)
+     */
+    public List getPendingAfterMarks() {
+        if (this.pendingAfterMarks != null) {
+            return Collections.unmodifiableList(this.pendingAfterMarks);
+        } else {
+            return null;
+        }
+    }
+    
+    /**
+     * Adds a border or padding element to the pending list which will be used to generate
+     * the right element list for break possibilities. Conditionality resolution will be done
+     * elsewhere.
+     * @param element the border, padding or space element
+     */
+    public void addPendingBeforeMark(UnresolvedListElementWithLength element) {
+        if (this.pendingBeforeMarks == null) {
+            this.pendingBeforeMarks = new java.util.ArrayList();
+        }
+        this.pendingBeforeMarks.add(element);
+    }
+    
+    /**
+     * @return the pending border and padding elements at the before edge
+     * @see addPendingBeforeMark(BorderOrPaddingElement)
+     */
+    public List getPendingBeforeMarks() {
+        if (this.pendingBeforeMarks != null) {
+            return Collections.unmodifiableList(this.pendingBeforeMarks);
+        } else {
+            return null;
+        }
+    }
+    
     public void setStackLimit(MinOptMax limit) {
         stackLimit = limit;
     }
diff --git a/src/java/org/apache/fop/layoutmgr/ListElement.java b/src/java/org/apache/fop/layoutmgr/ListElement.java
new file mode 100644 (file)
index 0000000..6707c66
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+/**
+ * This class is the base class for all kinds of elements that are added to element lists. There
+ * are basically two kinds of list elements: Knuth elements and unresolved elements like spaces,
+ * border and padding elements which are converted to Knuth elements prior to the breaking
+ * process. 
+ */
+public abstract class ListElement {
+
+    private Position position;
+    
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     */
+    public ListElement(Position position) {
+        this.position = position;
+    }
+    
+    /**
+     * @return the Position instance for this element.
+     */
+    public Position getPosition() {
+        return this.position;
+    }
+    
+    /**
+     * Change the Position stored in this element.
+     * @param position the Position instance
+     */
+    public void setPosition(Position position) {
+        this.position = position;
+    }
+
+    /**
+     * @return the LayoutManager responsible for this element.
+     */
+    public LayoutManager getLayoutManager() {
+        if (position != null) {
+            return position.getLM();
+        } else {
+            return null;
+        }
+    }
+
+    /** @return true if this element is a KnuthBox. */
+    public boolean isBox() {
+        return false;
+    }
+
+    /** @return true if this element is a KnuthGlue. */
+    public boolean isGlue() {
+        return false;
+    }
+
+    /** @return true if this element is a KnuthPenalty. */
+    public boolean isPenalty() {
+        return false;
+    }
+
+    /** @return true if the element is a penalty and represents a forced break. */ 
+    public boolean isForcedBreak() {
+        return false;
+    }
+
+    /** @return true if the element is an unresolved element such as a space or a border. */ 
+    public boolean isUnresolvedElement() {
+        return true;
+    }
+    
+}
diff --git a/src/java/org/apache/fop/layoutmgr/PaddingElement.java b/src/java/org/apache/fop/layoutmgr/PaddingElement.java
new file mode 100644 (file)
index 0000000..3928b7a
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import org.apache.fop.datatypes.PercentBaseContext;
+import org.apache.fop.fo.properties.CondLengthProperty;
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This represents an unresolved padding element.
+ */
+public class PaddingElement extends BorderOrPaddingElement {
+
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param side the side to which this space element applies.
+     * @param condLength the length-conditional property for a border or padding specification
+     * @param isFirst true if this is a padding- or border-before of the first area generated.
+     * @param isLast true if this is a padding- or border-after of the last area generated.
+     * @param context the property evaluation context
+     */
+    public PaddingElement(Position position, CondLengthProperty condLength,
+            RelSide side,
+            boolean isFirst, boolean isLast, PercentBaseContext context) {
+        super(position, condLength, side, isFirst, isLast, context);
+    }
+    
+    /** @see org.apache.fop.layoutmgr.UnresolvedListElementWithLength */
+    public void notifyLayoutManager(MinOptMax effectiveLength) {
+        LayoutManager lm = getOriginatingLayoutManager(); 
+        if (lm instanceof ConditionalElementListener) {
+            ((ConditionalElementListener)lm).notifyPadding(
+                    getSide(), effectiveLength);
+        } else {
+            log.warn("Cannot notify LM. It does not implement ConditionalElementListene: "
+                    + lm.getClass().getName());
+        }
+    }
+
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        StringBuffer sb = new StringBuffer("Padding[");
+        sb.append(super.toString());
+        sb.append("]");
+        return sb.toString();
+    }
+    
+}
index 507e2a38447e60c3ff45777e6a8edb584168e801..a6d912904f273d46f87c102ec09a76a6385a564b 100644 (file)
@@ -201,6 +201,11 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
         ListIterator elementListsIterator = elementLists.listIterator();
         while (elementListsIterator.hasNext()) {
             LinkedList noteList = (LinkedList) elementListsIterator.next();
+            
+            //Space resolution (Note: this does not respect possible stacking constraints 
+            //between footnotes!)
+            SpaceResolver.resolveElementList(noteList);
+            
             int noteLength = 0;
             footnotesList.add(noteList);
             ListIterator noteListIterator = noteList.listIterator();
index ed557b5a8b107007708a0f8689cbbf0aadeaade3..e56b22b3ea3130811ae500782e59d447e550a377 100644 (file)
@@ -227,7 +227,7 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
             if (contentList != null) {
                 ListIterator contentListIterator = contentList.listIterator();
                 while (contentListIterator.hasNext()) {
-                    KnuthElement element = (KnuthElement) contentListIterator.next();
+                    ListElement element = (ListElement) contentListIterator.next();
                     if (element instanceof KnuthBlockBox
                         && ((KnuthBlockBox) element).hasAnchors()) {
                         // element represents a line with footnote citations
@@ -424,6 +424,12 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
             return childFLM;
         }
         
+        /** @see org.apache.fop.layoutmgr.AbstractBreaker#observeElementList(java.util.List) */
+        protected void observeElementList(List elementList) {
+            ElementListObserver.observe(elementList, "breaker", 
+                    ((PageSequence)pslm.getFObj()).getId());
+        }
+        
     }
     
     /**
index ae38b96d5978114101db20c168132b5ea5df374d..cc0c73c89451d89d1bdec820a07bd2e4be5ec6c4 100644 (file)
@@ -60,7 +60,7 @@ public abstract class PositionIterator implements Iterator {
         LayoutManager lm = getLM(nextObj);
         if (childLM == null) {
             childLM = lm;
-        } else if (childLM != lm) {
+        } else if (childLM != lm && lm != null) {
             // End of this sub-sequence with same child LM
             bHasNext = false;
             childLM = null;
diff --git a/src/java/org/apache/fop/layoutmgr/RelSide.java b/src/java/org/apache/fop/layoutmgr/RelSide.java
new file mode 100644 (file)
index 0000000..6371cff
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+/** Enum class for relative sides. */
+public final class RelSide {
+
+    /** the before side */
+    public static final RelSide BEFORE = new RelSide("before");
+    /** the after side */
+    public static final RelSide AFTER = new RelSide("after");
+    /** the start side */
+    public static final RelSide START = new RelSide("start");
+    /** the end side */
+    public static final RelSide END = new RelSide("end");
+    
+    private String name;
+
+    /**
+     * Constructor to add a new named item.
+     * @param name Name of the item.
+     */
+    private RelSide(String name) {
+        this.name = name;
+    }
+
+    /** @return the name of the enum */
+    public String getName() {
+        return this.name;
+    }
+    
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        return "RelSide:" + name;
+    }
+    
+}
diff --git a/src/java/org/apache/fop/layoutmgr/SpaceElement.java b/src/java/org/apache/fop/layoutmgr/SpaceElement.java
new file mode 100644 (file)
index 0000000..ef365b7
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import org.apache.fop.datatypes.PercentBaseContext;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.properties.SpaceProperty;
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This class represents an unresolved space element.
+ */
+public class SpaceElement extends UnresolvedListElementWithLength {
+
+    private int precedence;
+    
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param space the space property
+     * @param side the side to which this space element applies.
+     * @param isFirst true if this is a space-before of the first area generated.
+     * @param isLast true if this is a space-after of the last area generated.
+     * @param context the property evaluation context
+     */
+    public SpaceElement(Position position, SpaceProperty space, RelSide side, 
+            boolean isFirst, boolean isLast,
+            PercentBaseContext context) {
+        super(position, 
+                MinOptMaxUtil.toMinOptMax(
+                        space.getSpace().getLengthRange(), 
+                context), side, space.isDiscard(), isFirst, isLast);
+        int en = space.getSpace().getPrecedence().getEnum();
+        if (en == Constants.EN_FORCE) {
+            this.precedence = Integer.MAX_VALUE;
+        } else {
+            this.precedence = space.getSpace().getPrecedence().getNumber().intValue(); 
+        }
+    }
+    
+    /** @return true if the space is forcing. */
+    public boolean isForcing() {
+        return this.precedence == Integer.MAX_VALUE;
+    }
+
+    /** @return the precedence of the space */
+    public int getPrecedence() {
+        return this.precedence;
+    }
+    
+    /** @see org.apache.fop.layoutmgr.UnresolvedListElementWithLength */
+    public void notifyLayoutManager(MinOptMax effectiveLength) {
+        LayoutManager lm = getOriginatingLayoutManager();
+        if (lm instanceof ConditionalElementListener) {
+            ((ConditionalElementListener)lm).notifySpace(
+                    getSide(), effectiveLength);
+        } else {
+            log.warn("Cannot notify LM. It does not implement ConditionalElementListener:" 
+                    + lm.getClass().getName());
+        }
+    }
+    
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        StringBuffer sb = new StringBuffer("Space[");
+        sb.append(super.toString());
+        sb.append(", precedence=");
+        if (isForcing()) {
+            sb.append("forcing");
+        } else {
+            sb.append(getPrecedence());
+        }
+        sb.append("]");
+        return sb.toString();
+    }
+
+}
diff --git a/src/java/org/apache/fop/layoutmgr/SpaceResolver.java b/src/java/org/apache/fop/layoutmgr/SpaceResolver.java
new file mode 100644 (file)
index 0000000..4faa92b
--- /dev/null
@@ -0,0 +1,635 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This class resolves spaces and conditional borders and paddings by replacing the
+ * UnresolvedListElements descendants by the right combination of KnuthElements on an element
+ * list.
+ */
+public class SpaceResolver {
+
+    /** Logger instance */
+    protected static Log log = LogFactory.getLog(SpaceResolver.class);
+    
+    private UnresolvedListElementWithLength[] firstPart;
+    private BreakElement breakPoss;
+    private UnresolvedListElementWithLength[] secondPart;
+    private UnresolvedListElementWithLength[] noBreak;
+    
+    private MinOptMax[] firstPartLengths;
+    private MinOptMax[] secondPartLengths;
+    private MinOptMax[] noBreakLengths;
+    
+    private boolean isFirst;
+    private boolean isLast;
+    
+    /**
+     * Main constructor.
+     * @param first Element list before a break (optional)
+     * @param breakPoss Break possibility (optional)
+     * @param second Element list after a break (or if no break possibility in vicinity)
+     * @param isFirst Resolution at the beginning of a (full) element list
+     * @param isLast Resolution at the end of a (full) element list
+     */
+    public SpaceResolver(List first, BreakElement breakPoss, List second, 
+            boolean isFirst, boolean isLast) {
+        this.isFirst = isFirst;
+        this.isLast = isLast;
+        //Create combined no-break list
+        int c = 0;
+        if (first != null) {
+            c += first.size();
+        }
+        if (second != null) {
+            c += second.size();
+        }
+        noBreak = new UnresolvedListElementWithLength[c];
+        noBreakLengths = new MinOptMax[c];
+        int i = 0;
+        ListIterator iter;
+        if (first != null) {
+            iter = first.listIterator(first.size());
+            while (iter.hasPrevious()) {
+                noBreak[i] = (UnresolvedListElementWithLength)iter.previous();
+                noBreakLengths[i] = noBreak[i].getLength();
+                i++;
+            }
+        }
+        if (second != null) {
+            iter = second.listIterator();
+            while (iter.hasNext()) {
+                noBreak[i] = (UnresolvedListElementWithLength)iter.next();
+                noBreakLengths[i] = noBreak[i].getLength();
+                i++;
+            }
+        }
+
+        //Add pending elements from higher level FOs
+        if (breakPoss != null) {
+            if (breakPoss.getPendingAfterMarks() != null) {
+                if (log.isTraceEnabled()) {
+                    log.trace("    adding pending before break: " 
+                            + breakPoss.getPendingAfterMarks());
+                }
+                first.addAll(0, breakPoss.getPendingAfterMarks());
+            }
+            if (breakPoss.getPendingBeforeMarks() != null) {
+                if (log.isTraceEnabled()) {
+                    log.trace("    adding pending after break: " 
+                            + breakPoss.getPendingBeforeMarks());
+                }
+                second.addAll(0, breakPoss.getPendingBeforeMarks());
+            }
+        }
+        if (log.isTraceEnabled()) {
+            log.trace("before: " + first);
+            log.trace("  break: " + breakPoss);
+            log.trace("after: " + second);
+            log.trace("NO-BREAK: " + toString(noBreak, noBreakLengths));
+        }
+
+        if (first != null) {
+            firstPart = new UnresolvedListElementWithLength[first.size()];
+            firstPartLengths = new MinOptMax[firstPart.length];
+            first.toArray(firstPart);
+            for (i = 0; i < firstPart.length; i++) {
+                firstPartLengths[i] = firstPart[i].getLength();
+            }
+        }
+        this.breakPoss = breakPoss;
+        if (second != null) {
+            secondPart = new UnresolvedListElementWithLength[second.size()];
+            secondPartLengths = new MinOptMax[secondPart.length];
+            second.toArray(secondPart);
+            for (i = 0; i < secondPart.length; i++) {
+                secondPartLengths[i] = secondPart[i].getLength();
+            }
+        }
+        resolve();
+    }
+    
+    private String toString(Object[] arr1, Object[] arr2) {
+        if (arr1.length != arr2.length) {
+            new IllegalArgumentException("The length of both arrays must be equal");
+        }
+        StringBuffer sb = new StringBuffer("[");
+        for (int i = 0; i < arr1.length; i++) {
+            if (i > 0) {
+                sb.append(", ");
+            }
+            sb.append(String.valueOf(arr1[i]));
+            sb.append("/");
+            sb.append(String.valueOf(arr2[i]));
+        }
+        sb.append("]");
+        return sb.toString();
+    }
+    
+    private void removeConditionalBorderAndPadding(
+                UnresolvedListElement[] elems, MinOptMax[] lengths) {
+        for (int i = 0; i < elems.length; i++) {
+            if (elems[i] instanceof BorderOrPaddingElement) {
+                BorderOrPaddingElement bop = (BorderOrPaddingElement)elems[i];
+                if (bop.isConditional() && !(bop.isFirst() || bop.isLast())) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Nulling conditional element: " + bop);
+                    }
+                    lengths[i] = null;
+                }
+            }
+        }
+        if (log.isTraceEnabled() && elems.length > 0) {
+            log.trace("-->Resulting list: " + toString(elems, lengths));
+        }
+    }
+    
+    private void performSpaceResolutionRule1(UnresolvedListElement[] elems, MinOptMax[] lengths) {
+        for (int i = 0; i < elems.length; i++) {
+            if (lengths[i] == null) {
+                //Zeroed border or padding doesn't create a fence
+                continue;
+            } else if (elems[i] instanceof BorderOrPaddingElement) {
+                //Border or padding form fences!
+                break;
+            } else if (!elems[i].isConditional()) {
+                break;
+            }
+            if (log.isDebugEnabled()) {
+                log.debug("Nulling conditional element using 4.3.1, rule 1: " + elems[i]);
+            }
+            lengths[i] = null;
+        }
+        if (log.isTraceEnabled() && elems.length > 0) {
+            log.trace("-->Resulting list: " + toString(elems, lengths));
+        }
+    }
+
+    private void performSpaceResolutionRules2to3(UnresolvedListElement[] elems, 
+            MinOptMax[] lengths, int start, int end) {
+        if (log.isTraceEnabled()) {
+            log.trace("rule 2-3: " + start + "-" + end);
+        }
+        SpaceElement space;
+        int remaining;
+        
+        //Rule 2 (4.3.1, XSL 1.0)
+        boolean hasForcing = false;
+        remaining = 0;
+        for (int i = start; i <= end; i++) {
+            if (lengths[i] == null) {
+                continue;
+            }
+            remaining++;
+            space = (SpaceElement)elems[i];
+            if (space.isForcing()) {
+                hasForcing = true;
+                break;
+            }
+        }
+        if (remaining == 0) {
+            return; //shortcut
+        }
+        if (hasForcing) {
+            for (int i = start; i <= end; i++) {
+                if (lengths[i] == null) {
+                    continue;
+                }
+                space = (SpaceElement)elems[i];
+                if (!space.isForcing()) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Nulling non-forcing space-specifier using 4.3.1, rule 2: " 
+                                + elems[i]);
+                    }
+                    lengths[i] = null;
+                }
+            }
+            return; //If rule is triggered skip rule 3
+        }
+        
+        //Rule 3 (4.3.1, XSL 1.0)
+        //Determine highes precedence
+        int highestPrecedence = Integer.MIN_VALUE;
+        for (int i = start; i <= end; i++) {
+            if (lengths[i] == null) {
+                continue;
+            }
+            space = (SpaceElement)elems[i];
+            highestPrecedence = Math.max(highestPrecedence, space.getPrecedence());
+        }
+        if (highestPrecedence != 0 && log.isDebugEnabled()) {
+            log.debug("Highest precedence is " + highestPrecedence);
+        }
+        //Suppress space-specifiers with lower precedence
+        remaining = 0;
+        int greatestOptimum = Integer.MIN_VALUE;
+        for (int i = start; i <= end; i++) {
+            if (lengths[i] == null) {
+                continue;
+            }
+            space = (SpaceElement)elems[i];
+            if (space.getPrecedence() != highestPrecedence) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Nulling space-specifier with precedence " 
+                            + space.getPrecedence() + " using 4.3.1, rule 3: " 
+                            + elems[i]);
+                }
+                lengths[i] = null;
+            } else {
+                greatestOptimum = Math.max(greatestOptimum, space.getLength().opt);
+                remaining++;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("Greatest optimum: " + greatestOptimum);
+        }
+        if (remaining <= 1) {
+            return;
+        }
+        //Suppress space-specifiers with smaller optimum length
+        remaining = 0;
+        for (int i = start; i <= end; i++) {
+            if (lengths[i] == null) {
+                continue;
+            }
+            space = (SpaceElement)elems[i];
+            if (space.getLength().opt < greatestOptimum) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Nulling space-specifier with smaller optimum length "
+                            + "using 4.3.1, rule 3: " 
+                            + elems[i]);
+                }
+                lengths[i] = null;
+            } else {
+                remaining++;
+            }
+        }
+        if (remaining <= 1) {
+            return;
+        }
+        //Construct resolved space-specifier from the remaining spaces
+        int min = Integer.MIN_VALUE;
+        int max = Integer.MAX_VALUE;
+        for (int i = start; i <= end; i++) {
+            if (lengths[i] == null) {
+                continue;
+            }
+            space = (SpaceElement)elems[i];
+            min = Math.max(min, space.getLength().min);
+            max = Math.min(max, space.getLength().max);
+            if (remaining > 1) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Nulling non-last space-specifier using 4.3.1, rule 3, second part: " 
+                            + elems[i]);
+                }
+                lengths[i] = null;
+                remaining--;
+            } else {
+                lengths[i].min = min;
+                lengths[i].max = max;
+            }
+        }
+
+        if (log.isTraceEnabled() && elems.length > 0) {
+            log.trace("Remaining spaces: " + remaining);
+            log.trace("-->Resulting list: " + toString(elems, lengths));
+        }
+    }
+    
+    private void performSpaceResolutionRules2to3(UnresolvedListElement[] elems,
+            MinOptMax[] lengths) {
+        int start = 0;
+        int i = start;
+        while (i < elems.length) {
+            if (elems[i] instanceof SpaceElement) {
+                while (i < elems.length) {
+                    if (elems[i] == null || elems[i] instanceof SpaceElement) {
+                        i++;
+                    } else {
+                        break;
+                    }
+                }
+                performSpaceResolutionRules2to3(elems, lengths, start, i - 1);
+            }
+            i++;
+            start = i;
+        }
+    }
+    
+    private void resolve() {
+        if (breakPoss != null) {
+            if (firstPart != null) {
+                removeConditionalBorderAndPadding(firstPart, firstPartLengths);
+                performSpaceResolutionRule1(firstPart, firstPartLengths);
+                performSpaceResolutionRules2to3(firstPart, firstPartLengths);
+            }
+            if (secondPart != null) {
+                removeConditionalBorderAndPadding(secondPart, secondPartLengths);
+                performSpaceResolutionRule1(secondPart, secondPartLengths);
+                performSpaceResolutionRules2to3(secondPart, secondPartLengths);
+            }
+            if (noBreak != null) {
+                performSpaceResolutionRules2to3(noBreak, noBreakLengths);
+            }
+        } else {
+            if (isFirst || isLast) {
+                performSpaceResolutionRule1(secondPart, secondPartLengths);
+                performSpaceResolutionRules2to3(secondPart, secondPartLengths);
+            }
+        }
+    }
+    
+    private MinOptMax sum(MinOptMax[] lengths) {
+        MinOptMax sum = new MinOptMax();
+        for (int i = 0; i < lengths.length; i++) {
+            if (lengths[i] != null) {
+                sum.add(lengths[i]);
+            }
+        }
+        return sum;
+    }
+    
+    private void generate(ListIterator iter) {
+        MinOptMax noBreakLength = new MinOptMax();
+        MinOptMax glue1; //space before break possibility if break occurs
+        //MinOptMax glue2; //difference between glue 1 and 3 when no break occurs
+        MinOptMax glue3; //space after break possibility if break occurs
+        glue1 = sum(firstPartLengths);
+        glue3 = sum(secondPartLengths);
+        noBreakLength = sum(noBreakLengths);
+        
+        //This doesn't produce the right glue2
+        //glue2 = new MinOptMax(noBreakLength);
+        //glue2.subtract(glue1);
+        //glue2.subtract(glue3);
+        
+        int glue2w = noBreakLength.opt - glue1.opt - glue3.opt;
+        int glue2stretch = (noBreakLength.max - noBreakLength.opt);
+        int glue2shrink = (noBreakLength.opt - noBreakLength.min);
+        glue2stretch -= glue1.max - glue1.opt;
+        glue2stretch -= glue3.max - glue3.opt;
+        glue2shrink -= glue1.opt - glue1.min;
+        glue2shrink -= glue3.opt - glue3.min;
+        
+        
+        if (log.isDebugEnabled()) {
+            log.debug("noBreakLength=" + noBreakLength 
+                    + ", glue1=" + glue1 
+                    + ", glue2=" + glue2w + "+" + glue2stretch + "-" + glue2shrink 
+                    + ", glue3=" + glue3);
+        }
+        if (breakPoss != null) {
+            if (glue1.isNonZero()) {
+                iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, 
+                        false, (Position)null, true));
+                iter.add(new KnuthGlue(glue1.opt, glue1.max - glue1.opt, glue1.opt - glue1.min, 
+                        (Position)null, true));
+            }
+            iter.add(new KnuthPenalty(breakPoss.getPenaltyWidth(), breakPoss.getPenaltyValue(), 
+                    false, breakPoss.getBreakClass(), 
+                    new SpaceHandlingBreakPosition(this), false));
+            //if (glue2.isNonZero()) {
+            if (glue2w != 0 || glue2stretch != 0 || glue2shrink != 0) {
+                /*
+                iter.add(new KnuthGlue(glue2.opt, glue2.max - glue2.opt, glue2.opt - glue2.min, 
+                        (Position)null, true));
+                        */
+                iter.add(new KnuthGlue(glue2w, glue2stretch, glue2shrink, 
+                        (Position)null, true));
+            }
+        } else {
+            if (glue1.isNonZero()) {
+                throw new IllegalStateException("glue1 should be 0 in this case");
+            }
+        }
+        Position pos = null;
+        if (breakPoss == null) {
+            pos = new SpaceHandlingPosition(this);
+        }
+        if (glue3.isNonZero() || pos != null) {
+            iter.add(new KnuthBox(0, pos, true));
+        }
+        if (glue3.isNonZero()) {
+            iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, 
+                    false, (Position)null, true));
+            iter.add(new KnuthGlue(glue3.opt, glue3.max - glue3.opt, glue3.opt - glue3.min, 
+                    (Position)null, true));
+        }
+        if (isLast) {
+            //Otherwise, the preceding penalty and glue will be cut off
+            iter.add(new KnuthBox(0, (Position)null, true));
+        }
+    }
+    
+    /**
+     * Position class for break possibilities. It is used to notify layout manager about the
+     * effective spaces and conditional lengths.
+     */
+    public class SpaceHandlingBreakPosition extends Position {
+
+        private SpaceResolver resolver;
+        
+        /**
+         * Main constructor.
+         * @param resolver the space resolver that provides the info about the actual situation
+         */
+        public SpaceHandlingBreakPosition(SpaceResolver resolver) {
+            super(null);
+            this.resolver = resolver;
+        }
+        
+        /** @return the space resolver */
+        public SpaceResolver getSpaceResolver() {
+            return this.resolver;
+        }
+        
+        /**
+         * Notifies all affected layout managers about the current situation in the part to be
+         * handled for area generation.
+         * @param isBreakSituation true if this is a break situation.
+         * @param side defines to notify about the situation whether before or after the break.
+         *             May be null if isBreakSituation is null. 
+         */
+        public void notifyBreakSituation(boolean isBreakSituation, RelSide side) {
+            if (isBreakSituation) {
+                if (RelSide.BEFORE == side) {
+                    for (int i = 0; i < resolver.secondPart.length; i++) {
+                        resolver.secondPart[i].notifyLayoutManager(resolver.secondPartLengths[i]);
+                    }
+                } else {
+                    for (int i = 0; i < resolver.firstPart.length; i++) {
+                        resolver.firstPart[i].notifyLayoutManager(resolver.firstPartLengths[i]);
+                    }
+                }
+            } else {
+                for (int i = 0; i < resolver.noBreak.length; i++) {
+                    if (resolver.noBreak[i] instanceof SpaceElement) {
+                        resolver.noBreak[i].notifyLayoutManager(resolver.noBreakLengths[i]);
+                    }
+                }
+            }
+        }
+        
+        /** @see java.lang.Object#toString() */
+        public String toString() {
+            StringBuffer sb = new StringBuffer();
+            sb.append("SpaceHandlingBreakPosition");
+            return sb.toString();
+        }
+    }
+    
+    /**
+     * Position class for no-break situations. It is used to notify layout manager about the
+     * effective spaces and conditional lengths.
+     */
+    public class SpaceHandlingPosition extends Position {
+
+        private SpaceResolver resolver;
+        
+        /**
+         * Main constructor.
+         * @param resolver the space resolver that provides the info about the actual situation
+         */
+        public SpaceHandlingPosition(SpaceResolver resolver) {
+            super(null);
+            this.resolver = resolver;
+        }
+        
+        /** @return the space resolver */
+        public SpaceResolver getSpaceResolver() {
+            return this.resolver;
+        }
+        
+        /**
+         * Notifies all affected layout managers about the current situation in the part to be
+         * handled for area generation.
+         */
+        public void notifySpaceSituation() {
+            if (resolver.breakPoss != null) {
+                throw new IllegalStateException("Only applicable to no-break situations");
+            }
+            for (int i = 0; i < resolver.secondPart.length; i++) {
+                if (resolver.secondPart[i] instanceof SpaceElement) {
+                    resolver.secondPart[i].notifyLayoutManager(resolver.secondPartLengths[i]);
+                }
+            }
+        }
+        
+        /** @see java.lang.Object#toString() */
+        public String toString() {
+            StringBuffer sb = new StringBuffer();
+            sb.append("SpaceHandlingPosition");
+            return sb.toString();
+        }
+    }
+    
+    /**
+     * Resolves unresolved elements applying the space resolution rules defined in 4.3.1.
+     * @param elems the element list
+     */
+    public static void resolveElementList(LinkedList elems) {
+        if (log.isTraceEnabled()) {
+            log.trace(elems);
+        }
+        boolean first = true;
+        boolean last = false;
+        boolean skipNextElement = false;
+        List unresolvedFirst = new java.util.ArrayList();
+        List unresolvedSecond = new java.util.ArrayList();
+        List currentGroup;
+        ListIterator iter = elems.listIterator();
+        while (iter.hasNext()) {
+            ListElement el = (ListElement)iter.next();
+            if (el.isUnresolvedElement()) {
+                if (log.isTraceEnabled()) {
+                    log.trace("unresolved found: " + el + " " + first + "/" + last);
+                }
+                BreakElement breakPoss = null;
+                //Clear temp lists
+                unresolvedFirst.clear();
+                unresolvedSecond.clear();
+                //Collect groups
+                if (el instanceof BreakElement) {
+                    breakPoss = (BreakElement)el;
+                    currentGroup = unresolvedSecond;
+                } else {
+                    currentGroup = unresolvedFirst;
+                    currentGroup.add(el);
+                }
+                iter.remove();
+                last = true;
+                skipNextElement = true;
+                while (iter.hasNext()) {
+                    el = (ListElement)iter.next();
+                    if (el instanceof BreakElement && breakPoss != null) {
+                        skipNextElement = false;
+                        last = false;
+                        break;
+                    } else if (currentGroup == unresolvedFirst && (el instanceof BreakElement)) {
+                        breakPoss = (BreakElement)el;
+                        iter.remove();
+                        currentGroup = unresolvedSecond;
+                    } else if (el.isUnresolvedElement()) {
+                        currentGroup.add(el);
+                        iter.remove();
+                    } else {
+                        last = false;
+                        break;
+                    }
+                }
+                //last = !iter.hasNext();
+                if (breakPoss == null & unresolvedSecond.size() == 0) {
+                    //The first list is reversed, so swap if this shouldn't happen
+                    List swapList = unresolvedSecond;
+                    unresolvedSecond = unresolvedFirst;
+                    unresolvedFirst = swapList;
+                }
+                //Need to reverse the order of the first part
+                //From here on further down, the first part in the unresolved list is 
+                //always the one nearest to the break.
+                if (unresolvedFirst.size() > 0) {
+                    Collections.reverse(unresolvedFirst);
+                }
+                
+                log.debug("----start space resolution (first=" + first + ", last=" + last + ")...");
+                SpaceResolver resolver = new SpaceResolver(
+                        unresolvedFirst, breakPoss, unresolvedSecond, first, last);
+                if (!last) {
+                    iter.previous();
+                }
+                resolver.generate(iter);
+                if (!last && skipNextElement) {
+                    iter.next();
+                }
+                log.debug("----end space resolution.");
+            }
+            first = false;
+        }
+    }
+
+}
index 949594bebb2f662331ca7724152ca09f9995327f..b77275fa0ac3ef505fdb56fa3e51d9cccd8cd168 100644 (file)
@@ -287,9 +287,9 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager {
                 }
                 if (returnedList != null) {
                     lm.wrapPositionElements(returnedList, returnList);
-                    //returnList.addAll(returnedList);
                 }
             }
+            SpaceResolver.resolveElementList(returnList);
             setFinished(true);
             return returnList;
         }
index 1dcf52b62d1468600e02f9de49d9b76eb2d3cc0d..89d03fff95cbd64002e03a273471c53e3d907a4b 100644 (file)
@@ -21,6 +21,7 @@ package org.apache.fop.layoutmgr;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.fop.traits.BorderProps;
+import org.apache.fop.traits.MinOptMax;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Trait;
 import org.apache.fop.datatypes.LengthBase;
@@ -105,12 +106,13 @@ public class TraitSetter {
     }
 
     /**
-     * Add borders to an area.
+     * Add borders to an area. Note: this method also adds unconditional padding. Don't use!
      * Layout managers that create areas with borders can use this to
      * add the borders to the area.
      * @param area the area to set the traits on.
      * @param bordProps border properties
      * @param context Property evaluation context
+     * @deprecated Call the other addBorders() method and addPadding separately.
      */
     public static void addBorders(Area area, CommonBorderPaddingBackground bordProps,
                                 PercentBaseContext context) {
@@ -134,6 +136,40 @@ public class TraitSetter {
         addPadding(area, bordProps, context);
     }
 
+    /**
+     * Add borders to an area.
+     * Layout managers that create areas with borders can use this to
+     * add the borders to the area.
+     * @param area the area to set the traits on.
+     * @param bordProps border properties
+     * @param discardBefore true if the before border should be discarded
+     * @param discardAfter true if the after border should be discarded
+     * @param discardStart true if the start border should be discarded
+     * @param discardEnd true if the end border should be discarded
+     * @param context Property evaluation context
+     */
+    public static void addBorders(Area area, CommonBorderPaddingBackground bordProps,
+                boolean discardBefore, boolean discardAfter,
+                boolean discardStart, boolean discardEnd,
+                PercentBaseContext context) {
+        BorderProps bps = getBorderProps(bordProps, CommonBorderPaddingBackground.BEFORE);
+        if (bps != null && !discardBefore) {
+            area.addTrait(Trait.BORDER_BEFORE, bps);
+        }
+        bps = getBorderProps(bordProps, CommonBorderPaddingBackground.AFTER);
+        if (bps != null && !discardAfter) {
+            area.addTrait(Trait.BORDER_AFTER, bps);
+        }
+        bps = getBorderProps(bordProps, CommonBorderPaddingBackground.START);
+        if (bps != null && !discardStart) {
+            area.addTrait(Trait.BORDER_START, bps);
+        }
+        bps = getBorderProps(bordProps, CommonBorderPaddingBackground.END);
+        if (bps != null && !discardEnd) {
+            area.addTrait(Trait.BORDER_END, bps);
+        }
+    }
+
     /**
      * Add borders to an area for the collapsing border model in tables.
      * Layout managers that create areas with borders can use this to
@@ -174,25 +210,49 @@ public class TraitSetter {
 
     private static void addPadding(Area area, CommonBorderPaddingBackground bordProps, 
                                 PercentBaseContext context) {
-        int padding = bordProps.getPadding(CommonBorderPaddingBackground.START, false, context);
+        addPadding(area, bordProps, false, false, false, false, context);
+    }
+
+    /**
+     * Add padding to an area.
+     * Layout managers that create areas with padding can use this to
+     * add the borders to the area.
+     * @param area the area to set the traits on.
+     * @param bordProps border and padding properties
+     * @param discardBefore true if the before padding should be discarded
+     * @param discardAfter true if the after padding should be discarded
+     * @param discardStart true if the start padding should be discarded
+     * @param discardEnd true if the end padding should be discarded
+     * @param context Property evaluation context
+     */
+    public static void addPadding(Area area, CommonBorderPaddingBackground bordProps,
+                boolean discardBefore, boolean discardAfter,
+                boolean discardStart, boolean discardEnd,
+                PercentBaseContext context) {
+        int padding = bordProps.getPadding(CommonBorderPaddingBackground.BEFORE, 
+                discardBefore, context);
         if (padding != 0) {
-            area.addTrait(Trait.PADDING_START, new java.lang.Integer(padding));
+            area.addTrait(Trait.PADDING_BEFORE, new java.lang.Integer(padding));
         }
 
-        padding = bordProps.getPadding(CommonBorderPaddingBackground.END, false, context);
+        padding = bordProps.getPadding(CommonBorderPaddingBackground.AFTER, 
+                discardAfter, context);
         if (padding != 0) {
-            area.addTrait(Trait.PADDING_END, new java.lang.Integer(padding));
+            area.addTrait(Trait.PADDING_AFTER, new java.lang.Integer(padding));
         }
 
-        padding = bordProps.getPadding(CommonBorderPaddingBackground.BEFORE, false, context);
+        padding = bordProps.getPadding(CommonBorderPaddingBackground.START, 
+                discardStart, context);
         if (padding != 0) {
-            area.addTrait(Trait.PADDING_BEFORE, new java.lang.Integer(padding));
+            area.addTrait(Trait.PADDING_START, new java.lang.Integer(padding));
         }
 
-        padding = bordProps.getPadding(CommonBorderPaddingBackground.AFTER, false, context);
+        padding = bordProps.getPadding(CommonBorderPaddingBackground.END, 
+                discardEnd, context);
         if (padding != 0) {
-            area.addTrait(Trait.PADDING_AFTER, new java.lang.Integer(padding));
+            area.addTrait(Trait.PADDING_END, new java.lang.Integer(padding));
         }
+
     }
     
     private static BorderProps getBorderProps(CommonBorderPaddingBackground bordProps, int side) {
@@ -254,9 +314,9 @@ public class TraitSetter {
                         width += backProps.getPaddingEnd(false, context);
                         back.setHoriz(backProps.backgroundPositionHorizontal.getValue(
                                 new SimplePercentBaseContext(context, 
-                                                             LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL,
-                                                             (width - back.getFopImage().getIntrinsicWidth())
-                                                            )
+                                    LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL,
+                                    (width - back.getFopImage().getIntrinsicWidth())
+                                )
                             ));
                     } else {
                         //TODO Area IPD has to be set for this to work
@@ -275,9 +335,9 @@ public class TraitSetter {
                         height += backProps.getPaddingAfter(false, context);
                         back.setVertical(backProps.backgroundPositionVertical.getValue(
                                 new SimplePercentBaseContext(context, 
-                                                             LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL,
-                                                             (height - back.getFopImage().getIntrinsicHeight())
-                                                            )
+                                     LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL,
+                                     (height - back.getFopImage().getIntrinsicHeight())
+                                )
                             ));
                     } else {
                         //TODO Area BPD has to be set for this to work
@@ -329,6 +389,32 @@ public class TraitSetter {
         }
     }
 
+    public static int getEffectiveSpace(double adjust, MinOptMax space) {
+        if (space == null) {
+            return 0;
+        }
+        int sp = space.opt;
+        if (adjust > 0) {
+            sp = sp + (int)(adjust * (space.max - space.opt));
+        } else {
+            sp = sp + (int)(adjust * (space.opt - space.min));
+        }
+        return sp;
+    }
+    
+    public static void addSpaceBeforeAfter(Area area, double adjust, 
+            MinOptMax spaceBefore, MinOptMax spaceAfter) {
+        int space;
+        space = getEffectiveSpace(adjust, spaceBefore);
+        if (space != 0) {
+            area.addTrait(Trait.SPACE_BEFORE, new Integer(space));
+        }
+        space = getEffectiveSpace(adjust, spaceAfter);
+        if (space != 0) {
+            area.addTrait(Trait.SPACE_AFTER, new Integer(space));
+        }
+    }
+    
     /**
      * Sets the traits for breaks on an area.
      * @param area the area to set the traits on.
diff --git a/src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java b/src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java
new file mode 100644 (file)
index 0000000..5f17db2
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+/**
+ * This class represents an unresolved list element.
+ */
+public abstract class UnresolvedListElement extends ListElement {
+
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     */
+    public UnresolvedListElement(Position position) {
+        super(position);
+    }
+    
+    /** @return true if the element is conditional (conditionality="discard") */
+    public abstract boolean isConditional();
+    
+    /** @return the layout manager that created this ListElement */
+    protected LayoutManager getOriginatingLayoutManager() {
+        Position pos = getPosition();
+        while (pos instanceof NonLeafPosition && pos.getPosition() != null) {
+            pos = pos.getPosition();
+        }
+        return pos.getLM();
+    }
+    
+}
diff --git a/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java b/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java
new file mode 100644 (file)
index 0000000..57637bb
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.layoutmgr;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.fop.traits.MinOptMax;
+
+/**
+ * This class represents an unresolved list element element with a (conditional) length. This
+ * is the base class for spaces, borders and paddings.
+ */
+public abstract class UnresolvedListElementWithLength extends UnresolvedListElement {
+
+    /** Logger instance */
+    protected static Log log = LogFactory.getLog(UnresolvedListElementWithLength.class);
+    
+    private MinOptMax length;
+    private boolean conditional;
+    private RelSide side;
+    private boolean isFirst;
+    private boolean isLast;
+    
+    /**
+     * Main constructor
+     * @param position the Position instance needed by the addAreas stage of the LMs.
+     * @param length the length of the element
+     * @param side the side to which this element applies
+     * @param conditional true if it's a conditional element (conditionality=discard)
+     * @param isFirst true if this is a space-before of the first area generated.
+     * @param isLast true if this is a space-after of the last area generated.
+     */
+    public UnresolvedListElementWithLength(Position position, MinOptMax length, 
+            RelSide side,
+            boolean conditional, boolean isFirst, boolean isLast) {
+        super(position);
+        this.length = length;
+        this.side = side;
+        this.conditional = conditional;
+        this.isFirst = isFirst;
+        this.isLast = isLast;
+    }
+    
+    /** @see org.apache.fop.layoutmgr.UnresolvedListElement#isConditional() */
+    public boolean isConditional() {
+        return this.conditional;
+    }
+    
+    /** @return the space as resolved MinOptMax instance */
+    public MinOptMax getLength() {
+        return this.length;
+    }
+    
+    /** @return the side this element was generated for */
+    public RelSide getSide() {
+        return this.side;
+    }
+    
+    /** @return true if this is a space-before of the first area generated. */
+    public boolean isFirst() {
+        return this.isFirst;
+    }
+    
+    /** @return true if this is a space-after of the last area generated. */
+    public boolean isLast() {
+        return this.isLast;
+    }
+    
+    /**
+     * Called to notify the affected layout manager about the effective length after resolution.
+     * This method is called once before each call to the layout manager's addAreas() method.
+     * @param effectiveLength the effective length after resolution (may be null which equals to
+     *                        zero effective length)
+     */
+    public abstract void notifyLayoutManager(MinOptMax effectiveLength);
+    
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append(getSide().getName()).append(", ");
+        sb.append(this.length.toString());
+        if (isConditional()) {
+            sb.append("[discard]");
+        } else {
+            sb.append("[RETAIN]");
+        }
+        if (isFirst()) {
+            sb.append("[first]");
+        }
+        if (isLast()) {
+            sb.append("[last]");
+        }
+        return sb.toString();
+    }
+    
+}
index d95525380b2f3ef8bfc4f02d5184743a0c3022de..d5cf5cc6b5f94950fd9153e314537edd3a1dc68d 100644 (file)
@@ -25,6 +25,7 @@ import org.apache.fop.fo.properties.CommonHyphenation;
 import org.apache.fop.hyphenation.Hyphenation;
 import org.apache.fop.hyphenation.Hyphenator;
 import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
+import org.apache.fop.layoutmgr.BreakElement;
 import org.apache.fop.layoutmgr.BreakingAlgorithm;
 import org.apache.fop.layoutmgr.ElementListObserver;
 import org.apache.fop.layoutmgr.KnuthBlockBox;
@@ -636,7 +637,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager
         }
 
         //PHASE 2: Create line breaks
-        return createLineBreaks(context.getBPAlignment());
+        return createLineBreaks(context.getBPAlignment(), context);
         /*
         LineBreakPosition lbp = null;
         if (breakpoints == null) {
@@ -973,9 +974,10 @@ public class LineLayoutManager extends InlineStackingLayoutManager
     /**
      * Phase 2 of Knuth algorithm: find optimal break points.
      * @param alignment alignment in BP direction of the paragraph
+     * @param context the layout context
      * @return a list of Knuth elements representing broken lines
      */
-    private LinkedList createLineBreaks(int alignment) {
+    private LinkedList createLineBreaks(int alignment, LayoutContext context) {
 
         // find the optimal line breaking points for each paragraph
         ListIterator paragraphsIterator
@@ -994,7 +996,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager
         setFinished(true);
     
         //Post-process the line breaks found
-        return postProcessLineBreaks(alignment);
+        return postProcessLineBreaks(alignment, context);
     }
 
     /**
@@ -1137,17 +1139,19 @@ public class LineLayoutManager extends InlineStackingLayoutManager
     /**
      * Creates the element list in BP direction for the broken lines.
      * @param alignment the currently applicable vertical alignment
+     * @param context the layout context
      * @return the newly built element list
      */
-    private LinkedList postProcessLineBreaks(int alignment) {
+    private LinkedList postProcessLineBreaks(int alignment, LayoutContext context) {
     
         LinkedList returnList = new LinkedList();
         
         for (int p = 0; p < knuthParagraphs.size(); p++) {
             // null penalty between paragraphs
-            if (p > 0
-                && !((BlockLevelLayoutManager) parentLM).mustKeepTogether()) {
-                returnList.add(new KnuthPenalty(0, 0, false, new Position(this), false));
+            if (p > 0 && !((BlockLevelLayoutManager) parentLM).mustKeepTogether()) {
+                returnList.add(new BreakElement(
+                        new Position(this), 0, context));
+                //returnList.add(new KnuthPenalty(0, 0, false, new Position(this), false));
             }
         
             lineLayouts = (LineLayoutPossibilities)lineLayoutsList.get(p);
@@ -1181,11 +1185,13 @@ public class LineLayoutManager extends InlineStackingLayoutManager
                         i < lineLayouts.getChosenLineCount();
                         i++) {
                     if (!((BlockLevelLayoutManager) parentLM).mustKeepTogether()
-                        && i >= fobj.getOrphans()
-                        && i <= lineLayouts.getChosenLineCount() - fobj.getWidows()
-                        && returnList.size() > 0) {
+                            && i >= fobj.getOrphans()
+                            && i <= lineLayouts.getChosenLineCount() - fobj.getWidows()
+                            && returnList.size() > 0) {
                         // null penalty allowing a page break between lines
-                        returnList.add(new KnuthPenalty(0, 0, false, returnPosition, false));
+                        returnList.add(new BreakElement(
+                                returnPosition, 0, context));
+                        //returnList.add(new KnuthPenalty(0, 0, false, returnPosition, false));
                     }
                     int endIndex = ((LineBreakPosition) lineLayouts.getChosenPosition(i)).getLeafPos();
                     // create a list of the FootnoteBodyLM handling footnotes 
index db157f4cfbfabe3cc3470914a39eef171c9b140a..e2334819d063c6efdae4582cf42da77a5f5c5213 100644 (file)
@@ -21,11 +21,13 @@ package org.apache.fop.layoutmgr.list;
 import org.apache.fop.fo.flow.ListBlock;
 import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
+import org.apache.fop.layoutmgr.ConditionalElementListener;
 import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LayoutContext;
 import org.apache.fop.layoutmgr.PositionIterator;
 import org.apache.fop.layoutmgr.Position;
 import org.apache.fop.layoutmgr.NonLeafPosition;
+import org.apache.fop.layoutmgr.RelSide;
 import org.apache.fop.layoutmgr.TraitSetter;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
@@ -41,11 +43,17 @@ import java.util.List;
  * A list block contains list items which are stacked within
  * the list block area..
  */
-public class ListBlockLayoutManager extends BlockStackingLayoutManager {
+public class ListBlockLayoutManager extends BlockStackingLayoutManager 
+                implements ConditionalElementListener {
 
     private Block curBlockArea;
 
-    //TODO space-before|after: handle space-resolution rules
+    private boolean discardBorderBefore;
+    private boolean discardBorderAfter;
+    private boolean discardPaddingBefore;
+    private boolean discardPaddingAfter;
+    private MinOptMax effSpaceBefore;
+    private MinOptMax effSpaceAfter;
 
     private static class StackingIter extends PositionIterator {
         StackingIter(Iterator parentIter) {
@@ -86,11 +94,23 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
         return (ListBlock)fobj;
     }
 
+    /** @see org.apache.fop.layoutmgr.LayoutManager#initialize() */
     public void initialize() {
-        foSpaceBefore = new SpaceVal(getListBlockFO().getCommonMarginBlock().spaceBefore, this).getSpace();
-        foSpaceAfter = new SpaceVal(getListBlockFO().getCommonMarginBlock().spaceAfter, this).getSpace();
+        foSpaceBefore = new SpaceVal(
+                getListBlockFO().getCommonMarginBlock().spaceBefore, this).getSpace();
+        foSpaceAfter = new SpaceVal(
+                getListBlockFO().getCommonMarginBlock().spaceAfter, this).getSpace();
     }
 
+    private void resetSpaces() {
+        this.discardBorderBefore = false;        
+        this.discardBorderAfter = false;        
+        this.discardPaddingBefore = false;        
+        this.discardPaddingAfter = false;
+        this.effSpaceBefore = foSpaceBefore;
+        this.effSpaceAfter = foSpaceAfter;
+    }
+    
     private int getIPIndents() {
         int iIndents = 0;
         iIndents += getListBlockFO().getCommonMarginBlock().startIndent.getValue(this);
@@ -98,6 +118,12 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
         return iIndents;
     }
     
+    /** @see org.apache.fop.layoutmgr.BlockStackingLayoutManager */
+    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+        resetSpaces(); 
+        return super.getNextKnuthElements(context, alignment);
+    }
+   
     /** @see org.apache.fop.layoutmgr.LayoutManager#getChangedKnuthElements(java.util.List, int) */
     public LinkedList getChangedKnuthElements(List oldList, int alignment) {
         //log.debug("LBLM.getChangedKnuthElements>");
@@ -122,8 +148,8 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
         }
 
         // if adjusted space before
-        double adjust = layoutContext.getSpaceAdjust();
-        addBlockSpacing(adjust, foSpaceBefore);
+        //double adjust = layoutContext.getSpaceAdjust();
+        //addBlockSpacing(adjust, foSpaceBefore);
         foSpaceBefore = null;
         
         getPSLM().addIDToPage(getListBlockFO().getId());
@@ -184,13 +210,16 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
         TraitSetter.addBackground(curBlockArea, 
                 getListBlockFO().getCommonBorderPaddingBackground(),
                 this);
+        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(), 
+                effSpaceBefore, effSpaceAfter);
 
         flush();
 
         // if adjusted space after
-        addBlockSpacing(adjust, foSpaceAfter);
+        //addBlockSpacing(adjust, foSpaceAfter);
         
         curBlockArea = null;
+        resetSpaces();
     }
 
     /**
@@ -217,7 +246,11 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
             // set traits
             TraitSetter.setProducerID(curBlockArea, getListBlockFO().getId());
             TraitSetter.addBorders(curBlockArea, 
-            getListBlockFO().getCommonBorderPaddingBackground(), this);
+                    getListBlockFO().getCommonBorderPaddingBackground(), 
+                    discardBorderBefore, discardBorderAfter, false, false, this);
+            TraitSetter.addPadding(curBlockArea, 
+                    getListBlockFO().getCommonBorderPaddingBackground(), 
+                    discardPaddingBefore, discardPaddingAfter, false, false, this);
             TraitSetter.addMargins(curBlockArea,
                     getListBlockFO().getCommonBorderPaddingBackground(), 
                     getListBlockFO().getCommonMarginBlock(),
@@ -278,5 +311,50 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
                 || !getListBlockFO().getKeepWithNext().getWithinColumn().isAuto();
     }
 
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifySpace(RelSide side, MinOptMax effectiveLength) {
+        if (RelSide.BEFORE == side) {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceBefore + "-> " + effectiveLength);
+            }
+            this.effSpaceBefore = effectiveLength;
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceAfter + "-> " + effectiveLength);
+            }
+            this.effSpaceAfter = effectiveLength;
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyBorder(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardBorderBefore = true;
+            } else {
+                this.discardBorderAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Border " + side + " -> " + effectiveLength);
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyPadding(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardPaddingBefore = true;
+            } else {
+                this.discardPaddingAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Padding " + side + " -> " + effectiveLength);
+        }
+    }
+
 }
 
index 3ebc4bda718f637c805847e2570c2f1144c2ccf8..184b6f01de275ef05f75c95161418483d86960f0 100644 (file)
@@ -23,11 +23,17 @@ import org.apache.fop.fo.flow.ListItemBody;
 import org.apache.fop.fo.flow.ListItemLabel;
 import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
+import org.apache.fop.layoutmgr.BreakElement;
+import org.apache.fop.layoutmgr.ConditionalElementListener;
+import org.apache.fop.layoutmgr.ElementListObserver;
+import org.apache.fop.layoutmgr.ElementListUtils;
 import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LayoutContext;
 import org.apache.fop.layoutmgr.PositionIterator;
 import org.apache.fop.layoutmgr.Position;
 import org.apache.fop.layoutmgr.NonLeafPosition;
+import org.apache.fop.layoutmgr.RelSide;
+import org.apache.fop.layoutmgr.SpaceResolver;
 import org.apache.fop.layoutmgr.TraitSetter;
 import org.apache.fop.layoutmgr.KnuthElement;
 import org.apache.fop.layoutmgr.KnuthBox;
@@ -35,6 +41,7 @@ import org.apache.fop.layoutmgr.KnuthPenalty;
 import org.apache.fop.layoutmgr.KnuthPossPosIter;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
+import org.apache.fop.traits.MinOptMax;
 import org.apache.fop.traits.SpaceVal;
 
 import java.util.ArrayList;
@@ -46,7 +53,8 @@ import java.util.ListIterator;
  * LayoutManager for a list-item FO.
  * The list item contains a list item label and a list item body.
  */
-public class ListItemLayoutManager extends BlockStackingLayoutManager {
+public class ListItemLayoutManager extends BlockStackingLayoutManager 
+                    implements ConditionalElementListener {
     private ListItemContentLayoutManager label;
     private ListItemContentLayoutManager body;
 
@@ -57,20 +65,16 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
 
     private int listItemHeight;
     
-    //TODO space-before|after: handle space-resolution rules
+    private boolean discardBorderBefore;
+    private boolean discardBorderAfter;
+    private boolean discardPaddingBefore;
+    private boolean discardPaddingAfter;
+    private MinOptMax effSpaceBefore;
+    private MinOptMax effSpaceAfter;
     
     private boolean keepWithNextPendingOnLabel;
     private boolean keepWithNextPendingOnBody;
-    
-    /*
-    private class ItemPosition extends LeafPosition {
-        protected List cellBreaks;
-        protected ItemPosition(LayoutManager lm, int pos, List l) {
-            super(lm, pos);
-            cellBreaks = l;
-        }
-    }*/
-
+  
     private class ListItemPosition extends Position {
         private int iLabelFirstIndex;
         private int iLabelLastIndex;
@@ -149,11 +153,23 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
         body.setParent(this);
     }
 
+    /** @see org.apache.fop.layoutmgr.LayoutManager#initialize() */
     public void initialize() {
-        foSpaceBefore = new SpaceVal(getListItemFO().getCommonMarginBlock().spaceBefore, this).getSpace();
-        foSpaceAfter = new SpaceVal(getListItemFO().getCommonMarginBlock().spaceAfter, this).getSpace();
+        foSpaceBefore = new SpaceVal(
+                getListItemFO().getCommonMarginBlock().spaceBefore, this).getSpace();
+        foSpaceAfter = new SpaceVal(
+                getListItemFO().getCommonMarginBlock().spaceAfter, this).getSpace();
     }
 
+    private void resetSpaces() {
+        this.discardBorderBefore = false;        
+        this.discardBorderAfter = false;        
+        this.discardPaddingBefore = false;        
+        this.discardPaddingAfter = false;
+        this.effSpaceBefore = foSpaceBefore;
+        this.effSpaceAfter = foSpaceAfter;
+    }
+    
     private int getIPIndents() {
         int iIndents = 0;
         iIndents += getListItemFO().getCommonMarginBlock().startIndent.getValue(this);
@@ -173,11 +189,20 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
             bSpaceBeforeServed = true;
         }
         
+        //Spaces, border and padding to be repeated at each break
+        addPendingMarks(context);
+
         // label
         childLC = new LayoutContext(0);
         childLC.setRefIPD(context.getRefIPD());
         label.initialize();
         labelList = label.getNextKnuthElements(childLC, alignment);
+        
+        //Space resolution as if the contents were placed in a new reference area
+        //(see 6.8.3, XSL 1.0, section on Constraints, last paragraph)
+        SpaceResolver.resolveElementList(labelList);
+        ElementListObserver.observe(labelList, "list-item-label", label.getPartFO().getId());
+        
         if (childLC.isKeepWithPreviousPending()) {
             context.setFlags(LayoutContext.KEEP_WITH_PREVIOUS_PENDING);
         }
@@ -188,13 +213,19 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
         childLC.setRefIPD(context.getRefIPD());
         body.initialize();
         bodyList = body.getNextKnuthElements(childLC, alignment);
+
+        //Space resolution as if the contents were placed in a new reference area
+        //(see 6.8.3, XSL 1.0, section on Constraints, last paragraph)
+        SpaceResolver.resolveElementList(bodyList);
+        ElementListObserver.observe(bodyList, "list-item-body", body.getPartFO().getId());
+        
         if (childLC.isKeepWithPreviousPending()) {
             context.setFlags(LayoutContext.KEEP_WITH_PREVIOUS_PENDING);
         }
         this.keepWithNextPendingOnBody = childLC.isKeepWithNextPending();
 
         // create a combined list
-        LinkedList returnedList = getCombinedKnuthElementsForListItem(labelList, bodyList);
+        LinkedList returnedList = getCombinedKnuthElementsForListItem(labelList, bodyList, context);
 
         // "wrap" the Position inside each element
         wrapPositionElements(returnedList, returnList, true);
@@ -209,16 +240,18 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
         }
 
         setFinished(true);
+        resetSpaces();
         return returnList;
     }
 
     private LinkedList getCombinedKnuthElementsForListItem(LinkedList labelElements,
-                                                           LinkedList bodyElements) {
+                                                           LinkedList bodyElements,
+                                                           LayoutContext context) {
         //Copy elements to array lists to improve element access performance
         List[] elementLists = {new ArrayList(labelElements),
                                new ArrayList(bodyElements)};
-        int[] fullHeights = {calcItemHeightFromContents(elementLists[0]),
-                            calcItemHeightFromContents(elementLists[1])};
+        int[] fullHeights = {ElementListUtils.calcContentLength(elementLists[0]),
+                ElementListUtils.calcContentLength(elementLists[1])};
         int[] partialHeights = {0, 0};
         int[] start = {-1, -1};
         int[] end = {-1, -1};
@@ -259,39 +292,14 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
                 if (keepWithNextActive || mustKeepTogether()) {
                     p = KnuthPenalty.INFINITE;
                 }
-                returnList.add(new KnuthPenalty(penaltyHeight, p, false, stepPosition, false));
+                //returnList.add(new KnuthPenalty(penaltyHeight, p, false, stepPosition, false));
+                returnList.add(new BreakElement(stepPosition, penaltyHeight, p, 0, context));
             }
         }
 
         return returnList;
     }
 
-    private int calcItemHeightFromContents(List elements, int start, int end) {
-        ListIterator iter = elements.listIterator(start);
-        int count = end - start + 1;
-        int len = 0;
-        while (iter.hasNext()) {
-            KnuthElement el = (KnuthElement)iter.next();
-            if (el.isBox()) {
-                len += el.getW();
-            } else if (el.isGlue()) {
-                len += el.getW();
-            } else {
-                log.debug("Ignoring penalty: " + el);
-                //ignore penalties
-            }
-            count--;
-            if (count == 0) {
-                break;
-            }
-        }
-        return len;
-    }
-    
-    private int calcItemHeightFromContents(List elements) {
-        return calcItemHeightFromContents(elements, 0, elements.size() - 1);
-    }
-
     private int getNextStep(List[] elementLists, int[] start, int[] end, int[] partialHeights) {
         // backup of partial heights
         int[] backupHeights = {partialHeights[0], partialHeights[1]};
@@ -423,9 +431,10 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
         getParentArea(null);
 
         // if adjusted space before
-        double adjust = layoutContext.getSpaceAdjust();
-        addBlockSpacing(adjust, foSpaceBefore);
-        foSpaceBefore = null;
+        //double adjust = layoutContext.getSpaceAdjust();
+        //addBlockSpacing(adjust, foSpaceBefore);
+        //addBlockSpacing(adjust, effSpaceBefore);
+        //foSpaceBefore = null;
 
         getPSLM().addIDToPage(getListItemFO().getId());
 
@@ -508,13 +517,17 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
         TraitSetter.addBackground(curBlockArea, 
                 getListItemFO().getCommonBorderPaddingBackground(),
                 this);
+        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(), 
+                effSpaceBefore, effSpaceAfter);
 
         flush();
 
         // if adjusted space after
-        addBlockSpacing(adjust, foSpaceAfter);
+        //addBlockSpacing(adjust, foSpaceAfter);
+        //addBlockSpacing(adjust, effSpaceAfter);
         
         curBlockArea = null;
+        resetSpaces();
     }
 
     /**
@@ -550,7 +563,11 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
             // set traits
             TraitSetter.setProducerID(curBlockArea, getListItemFO().getId());
             TraitSetter.addBorders(curBlockArea, 
-                    getListItemFO().getCommonBorderPaddingBackground(), this);
+                    getListItemFO().getCommonBorderPaddingBackground(), 
+                    discardBorderBefore, discardBorderAfter, false, false, this);
+            TraitSetter.addPadding(curBlockArea, 
+                    getListItemFO().getCommonBorderPaddingBackground(), 
+                    discardPaddingBefore, discardPaddingAfter, false, false, this);
             TraitSetter.addMargins(curBlockArea,
                     getListItemFO().getCommonBorderPaddingBackground(), 
                     getListItemFO().getCommonMarginBlock(), this);
@@ -610,5 +627,51 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
                 || !getListItemFO().getKeepWithNext().getWithinColumn().isAuto();
     }
 
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifySpace(RelSide side, MinOptMax effectiveLength) {
+        if (RelSide.BEFORE == side) {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceBefore + "-> " + effectiveLength);
+            }
+            this.effSpaceBefore = effectiveLength;
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug(this + ": Space " + side + ", " 
+                        + this.effSpaceAfter + "-> " + effectiveLength);
+            }
+            this.effSpaceAfter = effectiveLength;
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyBorder(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardBorderBefore = true;
+            } else {
+                this.discardBorderAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Border " + side + " -> " + effectiveLength);
+        }
+    }
+
+    /** @see org.apache.fop.layoutmgr.ConditionalElementListener */
+    public void notifyPadding(RelSide side, MinOptMax effectiveLength) {
+        if (effectiveLength == null) {
+            if (RelSide.BEFORE == side) {
+                this.discardPaddingBefore = true;
+            } else {
+                this.discardPaddingAfter = true;
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(this + ": Padding " + side + " -> " + effectiveLength);
+        }
+    }
+
+    
 }
 
index c4175f95b5df0d3df79d3ae9ef8f812d708c7dbe..80a394f28939122a0de49721e153f016834b0e9e 100644 (file)
@@ -27,12 +27,14 @@ import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 import org.apache.fop.layoutmgr.AreaAdditionUtil;
 import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
+import org.apache.fop.layoutmgr.BreakElement;
 import org.apache.fop.layoutmgr.KnuthElement;
 import org.apache.fop.layoutmgr.KnuthGlue;
-import org.apache.fop.layoutmgr.KnuthPenalty;
 import org.apache.fop.layoutmgr.LayoutContext;
+import org.apache.fop.layoutmgr.ListElement;
 import org.apache.fop.layoutmgr.PositionIterator;
 import org.apache.fop.layoutmgr.Position;
+import org.apache.fop.layoutmgr.SpaceResolver;
 import org.apache.fop.layoutmgr.TraitSetter;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
@@ -43,7 +45,8 @@ import org.apache.fop.traits.MinOptMax;
  * LayoutManager for a table-cell FO.
  * A cell contains blocks. These blocks fill the cell.
  */
-public class TableCellLayoutManager extends BlockStackingLayoutManager implements BlockLevelLayoutManager {
+public class TableCellLayoutManager extends BlockStackingLayoutManager 
+            implements BlockLevelLayoutManager {
     
     private TableCell fobj;
     private PrimaryGridUnit gridUnit;
@@ -82,6 +85,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
         return fobj.isSeparateBorderModel();
     }
     
+    /** @see org.apache.fop.layoutmgr.LayoutManager#initialize() */
     public void initialize() {
         borderAndPaddingBPD = 0;
         borderAndPaddingBPD += fobj.getCommonBorderPaddingBackground().getBorderBeforeWidth(false);
@@ -89,8 +93,10 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
         if (!isSeparateBorderModel()) {
             borderAndPaddingBPD /= 2;
         }
-        borderAndPaddingBPD += fobj.getCommonBorderPaddingBackground().getPaddingBefore(false, this);
-        borderAndPaddingBPD += fobj.getCommonBorderPaddingBackground().getPaddingAfter(false, this);
+        borderAndPaddingBPD += fobj.getCommonBorderPaddingBackground()
+                .getPaddingBefore(false, this);
+        borderAndPaddingBPD += fobj.getCommonBorderPaddingBackground()
+                .getPaddingAfter(false, this);
     }
     
     /**
@@ -159,8 +165,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
             }
             
             if (returnedList.size() == 1
-                    && ((KnuthElement) returnedList.getFirst()).isPenalty()
-                    && ((KnuthPenalty) returnedList.getFirst()).getP() == -KnuthElement.INFINITE) {
+                    && ((ListElement)returnedList.getFirst()).isForcedBreak()) {
                 // a descendant of this block has break-before
                 if (returnList.size() == 0) {
                     // the first child (or its first child ...) has
@@ -176,6 +181,9 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
                 returnedList = new LinkedList();
                 wrapPositionElements(contentList, returnList);
 
+                //Space resolution
+                SpaceResolver.resolveElementList(returnList);
+                
                 return returnList;
             } else {
                 if (prevLM != null) {
@@ -189,13 +197,17 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
                         childLC.setFlags(LayoutContext.KEEP_WITH_PREVIOUS_PENDING, false);
                         // add an infinite penalty to forbid a break between
                         // blocks
-                        contentList.add(new KnuthPenalty(0,
-                                KnuthElement.INFINITE, false,
-                                new Position(this), false));
+                        contentList.add(new BreakElement(
+                                new Position(this), KnuthElement.INFINITE, context));
+                        //contentList.add(new KnuthPenalty(0,
+                        //        KnuthElement.INFINITE, false,
+                        //        new Position(this), false));
                     } else if (!((KnuthElement) contentList.getLast()).isGlue()) {
                         // add a null penalty to allow a break between blocks
-                        contentList.add(new KnuthPenalty(0, 0, false,
-                                new Position(this), false));
+                        contentList.add(new BreakElement(
+                                new Position(this), 0, context));
+                        //contentList.add(new KnuthPenalty(0, 0, false,
+                        //        new Position(this), false));
                     } else {
                         // the last element in contentList is a glue;
                         // it is a feasible breakpoint, there is no need to add
@@ -207,9 +219,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
                     //Avoid NoSuchElementException below (happens with empty blocks)
                     continue;
                 }
-                if (((KnuthElement) returnedList.getLast()).isPenalty()
-                        && ((KnuthPenalty) returnedList.getLast()).getP() 
-                                == -KnuthElement.INFINITE) {
+                if (((ListElement)returnedList.getLast()).isForcedBreak()) {
                     // a descendant of this block has break-after
                     if (curLM.isFinished()) {
                         // there is no other content in this block;
@@ -220,6 +230,9 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
                     returnedList = new LinkedList();
                     wrapPositionElements(contentList, returnList);
 
+                    //Space resolution
+                    SpaceResolver.resolveElementList(returnList);
+                    
                     return returnList;
                 }
             }
@@ -234,6 +247,9 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
         returnedList = new LinkedList();
         wrapPositionElements(contentList, returnList);
         
+        //Space resolution
+        SpaceResolver.resolveElementList(returnList);
+        
         setFinished(true);
         return returnList;
     }
index fd4a81b58529d9dd28ff067413b982c42b86e067..f5c28dfe48015f30c3c36964e7075d15fdfc76a2 100644 (file)
@@ -48,6 +48,7 @@ import org.apache.fop.layoutmgr.MinOptMaxUtil;
 import org.apache.fop.layoutmgr.Position;
 import org.apache.fop.layoutmgr.PositionIterator;
 import org.apache.fop.layoutmgr.TraitSetter;
+import org.apache.fop.layoutmgr.SpaceResolver.SpaceHandlingBreakPosition;
 import org.apache.fop.traits.MinOptMax;
 
 /**
@@ -589,10 +590,12 @@ public class TableContentLayoutManager implements PercentBaseContext {
         Position lastPos = null;
         while (parentIter.hasNext()) {
             Position pos = (Position)parentIter.next();
-            if (firstPos == null) {
-                firstPos = pos;
+            if (!(pos instanceof SpaceHandlingBreakPosition)) {
+                if (firstPos == null) {
+                    firstPos = pos;
+                }
+                lastPos = pos;
             }
-            lastPos = pos;
             if (pos instanceof TableHeaderFooterPosition) {
                 TableHeaderFooterPosition thfpos = (TableHeaderFooterPosition)pos;
                 //these positions need to be unpacked
index cda906c9eb73c44fe60dcf79efcdec5094cf95d0..feedf8acfad8b40c9364c30271a5ff2be42a8f58 100644 (file)
@@ -28,6 +28,7 @@ import org.apache.fop.layoutmgr.KnuthElement;
 import org.apache.fop.layoutmgr.KnuthGlue;
 import org.apache.fop.layoutmgr.KnuthPenalty;
 import org.apache.fop.layoutmgr.LayoutContext;
+import org.apache.fop.layoutmgr.ListElement;
 import org.apache.fop.layoutmgr.PositionIterator;
 import org.apache.fop.layoutmgr.Position;
 import org.apache.fop.layoutmgr.TraitSetter;
@@ -114,7 +115,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager
         
         if (!bBreakBeforeServed) {
             try {
-                if (addKnuthElementsForBreakBefore(returnList)) {
+                if (addKnuthElementsForBreakBefore(returnList, context)) {
                     return returnList;
                 }
             } finally {
@@ -205,8 +206,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager
         log.debug(returnedList);
         
         if (returnedList.size() == 1
-                && ((KnuthElement) returnedList.getFirst()).isPenalty()
-                && ((KnuthPenalty) returnedList.getFirst()).getP() == -KnuthElement.INFINITE) {
+                && ((ListElement)returnedList.getFirst()).isForcedBreak()) {
             // a descendant of this block has break-before
             if (returnList.size() == 0) {
                 // the first child (or its first child ...) has
@@ -250,8 +250,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager
             }*/
             contentList.addAll(returnedList);
             if (returnedList.size() > 0) {
-                if (((KnuthElement) returnedList.getLast()).isPenalty()
-                        && ((KnuthPenalty) returnedList.getLast()).getP() == -KnuthElement.INFINITE) {
+                if (((ListElement)returnedList.getLast()).isForcedBreak()) {
                     // a descendant of this block has break-after
                     if (false /*curLM.isFinished()*/) {
                         // there is no other content in this block;
@@ -267,7 +266,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager
             }
         }
         wrapPositionElements(contentList, returnList);
-        addKnuthElementsForBreakAfter(returnList);
+        addKnuthElementsForBreakAfter(returnList, context);
         setFinished(true);
         return returnList;
     }
index 16c8f75aed559ce1a72a11989845e10e6f5f1a3f..764427357200ebe687ee1417393a6fbf52a0586d 100644 (file)
@@ -530,8 +530,9 @@ public abstract class AbstractRenderer
             int saveBP = currentBPPosition;
 
             if (block.getPositioning() == Block.ABSOLUTE) {
-                currentIPPosition = containingIPPosition + block.getXOffset();
-                currentBPPosition = containingBPPosition + block.getYOffset();
+                currentIPPosition += block.getXOffset();
+                currentBPPosition += block.getYOffset();
+                currentBPPosition += block.getSpaceBefore();
 
                 handleBlockTraits(block);
 
@@ -545,6 +546,7 @@ public abstract class AbstractRenderer
                 // relative blocks are offset
                 currentIPPosition += block.getXOffset();
                 currentBPPosition += block.getYOffset();
+                currentBPPosition += block.getSpaceBefore();
 
                 handleBlockTraits(block);
 
index 47469d1614aafd00566fec9e0fa2d02bc2b38e06..143e93ae054f4c018a70bc67b081ea443f0799ff 100644 (file)
@@ -162,6 +162,11 @@ public class MinOptMax implements java.io.Serializable, Cloneable {
         opt -= op.opt;
         max -= op.min;
     }
+    
+    /** @return true if this instance represents a zero-width length (min=opt=max=0) */
+    public boolean isNonZero() {
+        return (min != 0 || max != 0);
+    }
 
     /** @see java.lang.Object#toString() */
     public String toString() {
index 255cff900979e88308518273e4e7cdbcb34b0e45..881a8c3ee979c82420a404b47ff259f5be9f41aa 100644 (file)
@@ -23,7 +23,7 @@ import java.util.ListIterator;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.fop.layoutmgr.KnuthElement;
+import org.apache.fop.layoutmgr.ListElement;
 import org.apache.fop.layoutmgr.ElementListObserver.Observer;
 
 /**
@@ -49,9 +49,9 @@ public class LoggingElementListObserver implements Observer {
             return;
         }
         ListIterator tempIter = elementList.listIterator();
-        KnuthElement temp;
+        ListElement temp;
         while (tempIter.hasNext()) {
-            temp = (KnuthElement) tempIter.next();
+            temp = (ListElement) tempIter.next();
             if (temp.isBox()) {
                 log.debug(tempIter.previousIndex()
                         + ") " + temp);
index 2c69eee686246fa8ad172df16f36bd39990da3b0..b61e99f2c410f02e9ad46254cf22d0623b03277e 100644 (file)
@@ -17,7 +17,7 @@ inline_word-spacing_text-align_justify.xml
 leader-alignment.xml
 list-block_keep-with-previous.xml
 list-item_block_keep-with-previous.xml
-list-item_space-before_space-after_2.xml
+list-item_space-before_space-after_3.xml
 page-breaking_4.xml
 page-breaking_6.xml
 page-height_indefinite_simple.xml
index be7035e9e5077e6bfb4b0d22b72df7de499577f8..b483edbd3b65b760a7543c22fb619ea8b9174a6a 100644 (file)
   </fo>
   <checks>
     <!-- first block-container -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@is-viewport-area"/>
-    <eval expected="[1.0 0.0 0.0 1.0 0.0 0.0]" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ctm"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipda"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpd"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpda"/>
+    <true xpath="//flow/block[1]/@is-viewport-area"/>
+    <eval expected="[1.0 0.0 0.0 1.0 0.0 0.0]" xpath="//flow/block[1]/@ctm"/>
+    <eval expected="120000" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[1]/@ipda"/>
+    <eval expected="80000" xpath="//flow/block[1]/@bpd"/>
+    <eval expected="80000" xpath="//flow/block[1]/@bpda"/>
     <!--   -> reference area -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@is-reference-area"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@ipd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@ipda"/>
-    <eval expected="28800" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@bpd"/>
-    <eval expected="28800" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@bpda"/>
+    <true xpath="//flow/block[1]/block[1]/@is-reference-area"/>
+    <eval expected="120000" xpath="//flow/block[1]/block[1]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[1]/block[1]/@ipda"/>
+    <eval expected="28800" xpath="//flow/block[1]/block[1]/@bpd"/>
+    <eval expected="28800" xpath="//flow/block[1]/block[1]/@bpda"/>
 
     <!-- space-before of second block-container -->
-    <eval expected="10000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpda"/>
+    <eval expected="10000" xpath="//flow/block[2]/@space-before"/>
     
     <!-- second block-container -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@is-viewport-area"/>
-    <eval expected="[0.0 -1.0 1.0 0.0 0.0 80000.0]" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@ctm"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@ipd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@ipda"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@bpd"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@bpda"/>
+    <true xpath="//flow/block[2]/@is-viewport-area"/>
+    <eval expected="[0.0 -1.0 1.0 0.0 0.0 80000.0]" xpath="//flow/block[2]/@ctm"/>
+    <eval expected="120000" xpath="//flow/block[2]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[2]/@ipda"/>
+    <eval expected="80000" xpath="//flow/block[2]/@bpd"/>
+    <eval expected="100000" xpath="//flow/block[2]/@bpda"/>
     <!--   -> reference area -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/@is-reference-area"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/@ipd"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/@ipda"/>
-    <eval expected="43200" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/@bpd"/>
-    <eval expected="43200" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/@bpda"/>
+    <true xpath="//flow/block[2]/block[1]/@is-reference-area"/>
+    <eval expected="80000" xpath="//flow/block[2]/block[1]/@ipd"/>
+    <eval expected="80000" xpath="//flow/block[2]/block[1]/@ipda"/>
+    <eval expected="43200" xpath="//flow/block[2]/block[1]/@bpd"/>
+    <eval expected="43200" xpath="//flow/block[2]/block[1]/@bpda"/>
 
     <!-- space-after of second block-container -->
-    <eval expected="10000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bpda"/>
+    <eval expected="10000" xpath="//flow/block[2]/@space-after"/>
 
     <!-- third block-container -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@is-viewport-area"/>
-    <eval expected="[-1.0 -0.0 0.0 -1.0 120000.0 80000.0]" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@ctm"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@ipd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@ipda"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bpd"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bpda"/>
+    <true xpath="//flow/block[3]/@is-viewport-area"/>
+    <eval expected="[-1.0 -0.0 0.0 -1.0 120000.0 80000.0]" xpath="//flow/block[3]/@ctm"/>
+    <eval expected="120000" xpath="//flow/block[3]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[3]/@ipda"/>
+    <eval expected="80000" xpath="//flow/block[3]/@bpd"/>
+    <eval expected="80000" xpath="//flow/block[3]/@bpda"/>
     <!--   -> reference area -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/@is-reference-area"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/@ipd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/@ipda"/>
-    <eval expected="61600" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/@bpd"/>
-    <eval expected="61600" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/@bpda"/>
+    <true xpath="//flow/block[3]/block[1]/@is-reference-area"/>
+    <eval expected="120000" xpath="//flow/block[3]/block[1]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[3]/block[1]/@ipda"/>
+    <eval expected="61600" xpath="//flow/block[3]/block[1]/@bpd"/>
+    <eval expected="61600" xpath="//flow/block[3]/block[1]/@bpda"/>
     <!-- contents (spacer first, then three lines) -->
-    <eval expected="18400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/block[1]/@bpda"/>
-    <eval expected="28800" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/block[2]/@bpda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/block[1]/block[3]/@bpda"/>
+    <eval expected="18400" xpath="//flow/block[3]/block[1]/block[1]/@bpda"/>
+    <eval expected="28800" xpath="//flow/block[3]/block[1]/block[2]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[3]/@bpda"/>
 
     <!-- space-before of fourth block-container -->
-    <eval expected="10000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bpda"/>
+    <eval expected="10000" xpath="//flow/block[4]/@space-before"/>
     
     <!-- fourth block-container -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@is-viewport-area"/>
-    <eval expected="[0.0 1.0 -1.0 0.0 120000.0 0.0]" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@ctm"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@ipd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@ipda"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@bpd"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@bpda"/>
+    <true xpath="//flow/block[4]/@is-viewport-area"/>
+    <eval expected="[0.0 1.0 -1.0 0.0 120000.0 0.0]" xpath="//flow/block[4]/@ctm"/>
+    <eval expected="120000" xpath="//flow/block[4]/@ipd"/>
+    <eval expected="120000" xpath="//flow/block[4]/@ipda"/>
+    <eval expected="80000" xpath="//flow/block[4]/@bpd"/>
+    <eval expected="90000" xpath="//flow/block[4]/@bpda"/>
     <!--   -> reference area -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/@is-reference-area"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/@ipd"/>
-    <eval expected="80000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/@ipda"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/@bpd"/>
-    <eval expected="120000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/@bpda"/>
+    <true xpath="//flow/block[4]/block[1]/@is-reference-area"/>
+    <eval expected="80000" xpath="//flow/block[4]/block[1]/@ipd"/>
+    <eval expected="80000" xpath="//flow/block[4]/block[1]/@ipda"/>
+    <eval expected="120000" xpath="//flow/block[4]/block[1]/@bpd"/>
+    <eval expected="120000" xpath="//flow/block[4]/block[1]/@bpda"/>
     <!-- contents (spacer first, then three lines) -->
-    <eval expected="76800" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/block[1]/@bpda"/>
-    <eval expected="28800" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/block[2]/@bpda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/block[1]/block[3]/@bpda"/>
+    <eval expected="76800" xpath="//flow/block[4]/block[1]/block[1]/@bpda"/>
+    <eval expected="28800" xpath="//flow/block[4]/block[1]/block[2]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[4]/block[1]/block[3]/@bpda"/>
 
   </checks>
 </testcase>
diff --git a/test/layoutengine/testcases/block-container_space-before_space-after_1.xml b/test/layoutengine/testcases/block-container_space-before_space-after_1.xml
new file mode 100644 (file)
index 0000000..ed4615b
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 space properties on block-container.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" id="retain">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block-container space-before.optimum="20pt" space-before.conditionality="retain" space-after.optimum="10pt" space-after.conditionality="retain">
+            <fo:block text-align="justify">
+In olden times when wishing still helped one, there lived a king whose daughters 
+were all beautiful; and the youngest was so beautiful that the sun itself, which 
+has seen so much, was astonished whenever it shone in her face. Close by the king's 
+castle lay a great dark forest, and under an old lime-tree in the forest was a well, 
+and when the day was very warm, the king's child went out into the forest and sat 
+down by the side of the cool fountain; and when she was bored she took a golden ball, 
+and threw it up on high and caught it; and this ball was her favorite plaything.
+            </fo:block>
+          </fo:block-container>
+          <fo:block space-before.optimum="10pt" space-before.conditionality="retain" space-after.optimum="20pt" space-after.conditionality="retain">
+Two blocks, testing conditionality="retain".
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="normal" id="discard">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block-container space-before.optimum="20pt" space-before.conditionality="discard" space-after.optimum="10pt" space-after.conditionality="discard">
+            <fo:block text-align="justify">
+In olden times when wishing still helped one, there lived a king whose daughters 
+were all beautiful; and the youngest was so beautiful that the sun itself, which 
+has seen so much, was astonished whenever it shone in her face. Close by the king's 
+castle lay a great dark forest, and under an old lime-tree in the forest was a well, 
+and when the day was very warm, the king's child went out into the forest and sat 
+down by the side of the cool fountain; and when she was bored she took a golden ball, 
+and threw it up on high and caught it; and this ball was her favorite plaything.
+            </fo:block>
+          </fo:block-container>
+          <fo:block space-before.optimum="10pt" space-before.conditionality="discard" space-after.optimum="20pt" space-after.conditionality="discard">
+Two blocks, testing conditionality="discard".
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker" id="retain">
+      <box w="0"/> <!-- Helper box bearing the SpaceHandlingPosition and making sure the glue gets processed -->
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000" y="0" z="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000" y="0" z="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000" y="0" z="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000" y="0" z="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      
+      <!-- skip three more lines -->
+      <skip>8</skip>
+      <skip>8</skip>
+      <skip>8</skip>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000" y="0" z="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000" y="0" z="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="10000" aux="true"/>
+      <penalty w="0" p="0"/>
+      <glue w="-10000" aux="true"/>
+      
+      <box w="0" aux="true"/>
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="10000" aux="true"/>
+      
+      <box w="14400"/> <!-- second block -->
+      
+      <box w="0" aux="true"/>
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="20000" aux="true"/>
+      
+      <box w="0" aux="true"/> <!-- This is used to make sure the preceding glue is not cut off -->
+      
+      <skip>3</skip>
+    </element-list>
+    <element-list category="breaker" id="discard">
+      <box w="0"/> <!-- Helper box used to notify the LM for the addAreas stage about the discarded spaces -->
+      <box w="14400"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <glue w="10000"/>
+      
+      <box w="14400"/> <!-- second block -->
+      
+      <box w="0"/> <!-- SpaceHandlingPosition-bearing helper box -->
+      
+      <box w="0"/> <!-- This is used to make sure the preceding glue is not cut off -->
+      
+      <skip>3</skip>
+    </element-list>
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/block-container_space-before_space-after_2.xml b/test/layoutengine/testcases/block-container_space-before_space-after_2.xml
new file mode 100644 (file)
index 0000000..d742b3e
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 block-level space properties. Demonstrates that spaces are repeated on every generated area.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="30pt">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body" line-height="10pt" font-size="9pt">
+          <fo:block-container space-before="5pt" space-before.conditionality="retain" background-color="yellow">
+             <fo:block>line 1</fo:block>
+             <fo:block>line 2</fo:block>
+             <fo:block>line 3</fo:block>
+             <fo:block>line 4</fo:block>
+             <fo:block>line 5</fo:block>
+          </fo:block-container>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker">
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-5000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-5000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-5000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-5000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      
+      <skip>3</skip>
+    </element-list>
+    <eval expected="3" xpath="count(//pageViewport)"/>
+    <eval expected="5000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="5000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="5000" xpath="//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block)"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block)"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block)"/>
+    <eval expected="2" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/block)"/>
+    <eval expected="2" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/block)"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/block)"/>
+    
+  </checks>
+</testcase>
index dd32789178788edea4fbcae5f96f91a3f7e39fc4..caf2835425cb1c847f0f3c70ad73162f9dbf5893 100644 (file)
   </fo>
   <checks>
     <!-- First block, no gap -->
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@border-start"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@border-end"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@border-before"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bap"/>
-    <eval expected="350000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipd"/>
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipda"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpd"/>
-    <eval expected="34400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpda"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[1]/@border-start"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[1]/@border-end"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[1]/@border-before"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[1]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[1]/@bap"/>
+    <eval expected="350000" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="360000" xpath="//flow/block[1]/@ipda"/>
+    <eval expected="24400" xpath="//flow/block[1]/@bpd"/>
+    <eval expected="34400" xpath="//flow/block[1]/@bpda"/>
     <!-- Nested block of first block -->
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-start"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@bap"/>
-    <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@ipd"/>
-    <eval expected="350000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@bpd"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@bpda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[1]/block[1]/@border-start"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[1]/block[1]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[1]/block[1]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[1]/block[1]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[1]/block[1]/@bap"/>
+    <eval expected="340000" xpath="//flow/block[1]/block[1]/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[1]/block[1]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/@bpd"/>
+    <eval expected="24400" xpath="//flow/block[1]/block[1]/@bpda"/>
 
     <!-- Second block, 5pt gap -->
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@border-start"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@border-end"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@border-before"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@border-after"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@padding-start"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@padding-end"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@padding-before"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@padding-after"/>
-    <eval expected="10000 10000 10000 10000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bap"/>
-    <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipd"/>
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipda"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpd"/>
-    <eval expected="44400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpda"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[2]/@border-start"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[2]/@border-end"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[2]/@border-before"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[2]/@border-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-after"/>
+    <eval expected="10000 10000 10000 10000" xpath="//flow/block[2]/@bap"/>
+    <eval expected="340000" xpath="//flow/block[2]/@ipd"/>
+    <eval expected="360000" xpath="//flow/block[2]/@ipda"/>
+    <eval expected="24400" xpath="//flow/block[2]/@bpd"/>
+    <eval expected="44400" xpath="//flow/block[2]/@bpda"/>
     <!-- Nested block of second block -->
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@border-start"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@bap"/>
-    <eval expected="330000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@ipd"/>
-    <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@bpd"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@bpda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/block[1]/@border-start"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/block[1]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/block[1]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/block[1]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[2]/block[1]/@bap"/>
+    <eval expected="330000" xpath="//flow/block[2]/block[1]/@ipd"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[1]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/@bpd"/>
+    <eval expected="24400" xpath="//flow/block[2]/block[1]/@bpda"/>
 
     <!-- third block, no gap between borders but margin around outer block -->
     <!--     space before block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[3]/@space-before"/>
     <!--     actual block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@space-start"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@space-end"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@border-start"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@border-end"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@border-before"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bap"/>
-    <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@ipd"/>
-    <eval expected="350000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@ipda"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bpd"/>
-    <eval expected="34400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bpda"/>
+    <eval expected="5000" xpath="//flow/block[3]/@space-start"/>
+    <eval expected="5000" xpath="//flow/block[3]/@space-end"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[3]/@border-start"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[3]/@border-end"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[3]/@border-before"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[3]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[3]/@bap"/>
+    <eval expected="340000" xpath="//flow/block[3]/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[3]/@ipda"/>
+    <eval expected="24400" xpath="//flow/block[3]/@bpd"/>
+    <eval expected="44400" xpath="//flow/block[3]/@bpda"/>
     <!--     space after block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[3]/@space-after"/>
 
     <!-- Nested block of third block -->
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@border-start"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@bap"/>
-    <eval expected="330000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@ipd"/>
-    <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@bpd"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/block[1]/@bpda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[3]/block[1]/@border-start"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[3]/block[1]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[3]/block[1]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[3]/block[1]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[3]/block[1]/@bap"/>
+    <eval expected="330000" xpath="//flow/block[3]/block[1]/@ipd"/>
+    <eval expected="340000" xpath="//flow/block[3]/block[1]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[3]/block[1]/@bpd"/>
+    <eval expected="24400" xpath="//flow/block[3]/block[1]/@bpda"/>
 
     <!-- Fourth block, looks like the second block, but using margin on inner block instead of padding on outer block -->
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@border-start"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@border-end"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@border-before"/>
-    <eval expected="(solid,#0000ff,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bap"/>
-    <eval expected="350000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@ipd"/>
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@ipda"/>
-    <eval expected="34400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bpd"/>
-    <eval expected="44400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bpda"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[4]/@border-start"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[4]/@border-end"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[4]/@border-before"/>
+    <eval expected="(solid,#0000ff,5000)" xpath="//flow/block[4]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[4]/@bap"/>
+    <eval expected="350000" xpath="//flow/block[4]/@ipd"/>
+    <eval expected="360000" xpath="//flow/block[4]/@ipda"/>
+    <eval expected="34400" xpath="//flow/block[4]/@bpd"/>
+    <eval expected="44400" xpath="//flow/block[4]/@bpda"/>
     <!-- Nested block of second block -->
     <!--     space before block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[1]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[4]/block[1]/@space-before"/>
     <!--     actual block -->
-    <eval expected="10000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@space-start"/>
-    <eval expected="10000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@space-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@border-start"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@border-after"/>
-    <eval expected="5000 5000 5000 5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@bap"/>
-    <eval expected="330000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@ipd"/>
-    <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@bpd"/>
-    <eval expected="24400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[2]/@bpda"/>
+    <eval expected="10000" xpath="//flow/block[4]/block[1]/@space-start"/>
+    <eval expected="10000" xpath="//flow/block[4]/block[1]/@space-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/block[1]/@border-start"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/block[1]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/block[1]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/block[1]/@border-after"/>
+    <eval expected="5000 5000 5000 5000" xpath="//flow/block[4]/block[1]/@bap"/>
+    <eval expected="330000" xpath="//flow/block[4]/block[1]/@ipd"/>
+    <eval expected="340000" xpath="//flow/block[4]/block[1]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[4]/block[1]/@bpd"/>
+    <eval expected="34400" xpath="//flow/block[4]/block[1]/@bpda"/>
     <!--     space after block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/block[3]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[4]/block[1]/@space-after"/>
 
   </checks>
 </testcase>
index 8259c0a0a218e95d5c7980dae9353ebad956c790..3723e5da00084da4deff6802a0331966ee81b964 100644 (file)
     </fo:root>
   </fo>
   <checks>
-    <!-- padding-left -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-start"/>
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bap"/>
-    <eval expected="355000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipd"/>
-    <eval expected="355000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpd"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpda"/>
-    <!-- padding-right -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-end"/>
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bap"/>
-    <eval expected="355000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipd"/>
-    <eval expected="355000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpd"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpda"/>
-    <!-- padding-top -->
+    <!-- margin-left -->
+    <eval expected="5000" xpath="//flow/block[1]/@space-start"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[1]/@bap"/>
+    <eval expected="355000" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="355000" xpath="//flow/block[1]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[1]/@bpd"/>
+    <eval expected="14400" xpath="//flow/block[1]/@bpda"/>
+    <!-- margin-right -->
+    <eval expected="5000" xpath="//flow/block[2]/@space-end"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[2]/@bap"/>
+    <eval expected="355000" xpath="//flow/block[2]/@ipd"/>
+    <eval expected="355000" xpath="//flow/block[2]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[2]/@bpd"/>
+    <eval expected="14400" xpath="//flow/block[2]/@bpda"/>
+    <!-- margin-top -->
     <!--     space before block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[3]/@space-before"/>
     <!--     actual block -->
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bap"/>
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bpda"/>
-    <!-- padding-bottom -->
+    <eval expected="0 0 0 0" xpath="//flow/block[3]/@bap"/>
+    <eval expected="360000" xpath="//flow/block[3]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[3]/@bpd"/>
+    <eval expected="19400" xpath="//flow/block[3]/@bpda"/>
+    <!-- margin-bottom -->
     <!--     actual block -->
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bap"/>
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bpda"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[4]/@bap"/>
+    <eval expected="360000" xpath="//flow/block[4]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[4]/@bpd"/>
+    <eval expected="19400" xpath="//flow/block[4]/@bpda"/>
     <!--     space after block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[4]/@space-after"/>
   </checks>
 </testcase>
index da022fb3bd9e96f26935880f635aa1ab26430678..ea43a11cd50235d3094895597ce143028df99bd0 100644 (file)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="0" xpath="//flow/block[1]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[1]/@bpd"/>
-    <eval expected="324000" xpath="//flow/block[2]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[2]/@start-indent"/>
-    <eval expected="18000" xpath="//flow/block[2]/@end-indent"/>
-    <eval expected="18000" xpath="//flow/block[2]/@space-start"/>
-    <eval expected="18000" xpath="//flow/block[2]/@space-end"/>
-    <eval expected="0" xpath="//flow/block[2]/block[1]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[2]/block[1]/@bpd"/>
-    <eval expected="288000" xpath="//flow/block[2]/block[2]/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[2]/block[2]/@start-indent"/>
-    <eval expected="36000" xpath="//flow/block[2]/block[2]/@end-indent"/>
-    <eval expected="36000" xpath="//flow/block[2]/block[2]/@space-start"/>
-    <eval expected="36000" xpath="//flow/block[2]/block[2]/@space-end"/>
-    <eval expected="0" xpath="//flow/block[2]/block[3]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[2]/block[3]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[3]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[3]/@bpd"/>
+    <element-list category="breaker">
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="18000" y="0" z="0"/>
+      <box w="14400"/>
+      <box w="14400"/>
+      <penalty w="0" p="INF"/>
+      <glue w="18000" y="0" z="0"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+  
+    <true xpath="not(boolean(//flow/block[1]/@space-before))"/> <!-- space collapsed under space resolution rules -->
+    <eval expected="324000" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[1]/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block[1]/@end-indent"/>
+    <eval expected="18000" xpath="//flow/block[1]/@space-start"/>
+    <eval expected="18000" xpath="//flow/block[1]/@space-end"/>
+    
+    <eval expected="18000" xpath="//flow/block[1]/block[1]/@space-before"/>
+    <eval expected="288000" xpath="//flow/block[1]/block[1]/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[1]/block[1]/@start-indent"/>
+    <eval expected="36000" xpath="//flow/block[1]/block[1]/@end-indent"/>
+    <eval expected="36000" xpath="//flow/block[1]/block[1]/@space-start"/>
+    <eval expected="36000" xpath="//flow/block[1]/block[1]/@space-end"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/@space-after))"/>  <!-- space collapsed under space resolution rules -->
+    <true xpath="not(boolean(//flow/block[1]/block[2]))"/>
+    
+    <eval expected="18000" xpath="//flow/block[1]/@space-after"/>
   </checks>
 </testcase>
index f3f9b531c7d2a5e4b3f8291ba55efeaffad32a48..c84a816c5f75b96fbb711f08f67562d55bf72b19 100644 (file)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="0" xpath="//flow/block[1]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[1]/@bpd"/>
-    <eval expected="324000" xpath="//flow/block[2]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[2]/@start-indent"/>
-    <eval expected="18000" xpath="//flow/block[2]/@end-indent"/>
-    <eval expected="18000" xpath="//flow/block[2]/@space-start"/>
-    <eval expected="18000" xpath="//flow/block[2]/@space-end"/>
-    <eval expected="0" xpath="//flow/block[2]/block[1]/@ipd"/>
-    <eval expected="16200" xpath="//flow/block[2]/block[1]/@bpd"/>
-    <eval expected="291600" xpath="//flow/block[2]/block[2]/@ipd"/>
-    <eval expected="34200" xpath="//flow/block[2]/block[2]/@start-indent"/>
-    <eval expected="34200" xpath="//flow/block[2]/block[2]/@end-indent"/>
-    <eval expected="34200" xpath="//flow/block[2]/block[2]/@space-start"/>
-    <eval expected="34200" xpath="//flow/block[2]/block[2]/@space-end"/>
-    <eval expected="0" xpath="//flow/block[2]/block[3]/@ipd"/>
-    <eval expected="16200" xpath="//flow/block[2]/block[3]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[3]/@ipd"/>
-    <eval expected="18000" xpath="//flow/block[3]/@bpd"/>
+    <element-list category="breaker">
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="18000" y="0" z="0"/>
+      <box w="14400"/>
+      <box w="14400"/>
+      <penalty w="0" p="INF"/>
+      <glue w="18000" y="0" z="0"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+  
+    <eval expected="18000" xpath="//flow/block[1]/@space-before"/>
+    <eval expected="324000" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[1]/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block[1]/@end-indent"/>
+    <eval expected="18000" xpath="//flow/block[1]/@space-start"/>
+    <eval expected="18000" xpath="//flow/block[1]/@space-end"/>
+    
+    <true xpath="not(boolean(//flow/block[1]/block[1]/@space-before))"/>  <!-- space collapsed under space resolution rules -->
+    <eval expected="291600" xpath="//flow/block[1]/block[1]/@ipd"/>
+    <eval expected="34200" xpath="//flow/block[1]/block[1]/@start-indent"/>
+    <eval expected="34200" xpath="//flow/block[1]/block[1]/@end-indent"/>
+    <eval expected="34200" xpath="//flow/block[1]/block[1]/@space-start"/>
+    <eval expected="34200" xpath="//flow/block[1]/block[1]/@space-end"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/@space-after))"/>  <!-- space collapsed under space resolution rules -->
+    <true xpath="not(boolean(//flow/block[1]/block[2]))"/>
+    
+    <eval expected="18000" xpath="//flow/block[1]/@space-after"/>
   </checks>
 </testcase>
index 8dc53fd9012c3f807307c84218a3a718fd9a5428..25ac7d553c206eccc74a7654a6cbbd14f8185053 100644 (file)
       </fo:layout-master-set>
       <fo:page-sequence master-reference="normal" white-space-collapse="true">
         <fo:flow flow-name="xsl-region-body">
+          <fo:block border-before-style="solid" border-before-width="1pt"/> <!-- These are to avoid stacking constraints between tests -->
           <fo:block margin="5pt">all</fo:block>
+          <fo:block border-before-style="solid" border-before-width="1pt"/>
           <fo:block margin="0pt 5pt">left/right</fo:block>
+          <fo:block border-before-style="solid" border-before-width="1pt"/>
           <fo:block margin="5pt 0pt">top/bottom</fo:block>
+          <fo:block border-before-style="solid" border-before-width="1pt"/>
           <fo:block margin="1pt 2pt 3pt">three values</fo:block>
+          <fo:block border-before-style="solid" border-before-width="1pt"/>
           <fo:block>EOF</fo:block>
         </fo:flow>
       </fo:page-sequence>
   <checks>
     <!-- *** all *** -->
     <!--     space before block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[2]/@space-before"/>
     <!--     actual block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-start"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-end"/>
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bap"/>
-    <eval expected="350000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpda"/>
+    <eval expected="5000" xpath="//flow/block[2]/@space-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/@space-end"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[2]/@bap"/>
+    <eval expected="350000" xpath="//flow/block[2]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[2]/@bpd"/>
+    <eval expected="24400" xpath="//flow/block[2]/@bpda"/>
     <!--     space after block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[2]/@space-after"/>
     
     <!-- *** left/right *** -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@space-start"/>
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@space-end"/>
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bap"/>
-    <eval expected="350000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bpda"/>
+    <eval expected="5000" xpath="//flow/block[4]/@space-start"/>
+    <eval expected="5000" xpath="//flow/block[4]/@space-end"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[4]/@bap"/>
+    <eval expected="350000" xpath="//flow/block[4]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[4]/@bpda"/>
     
     <!-- *** top/bottom *** -->
     <!--     space before block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[6]/@space-before"/>
     <!--     actual block -->
-    <true xpath="not(/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@space-start)"/>
-    <true xpath="not(/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@space-end)"/>
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bap"/>
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bpda"/>
+    <true xpath="not(//flow/block[6]/@space-start)"/>
+    <true xpath="not(//flow/block[6]/@space-end)"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[6]/@bap"/>
+    <eval expected="360000" xpath="//flow/block[6]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[6]/@bpd"/>
+    <eval expected="24400" xpath="//flow/block[6]/@bpda"/>
     <!--     space after block -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[6]/@space-after"/>
     
     <!-- *** three values *** -->
     <!--     space before block -->
-    <eval expected="1000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[8]/@bpd"/>
+    <eval expected="1000" xpath="//flow/block[8]/@space-before"/>
     <!--     actual block -->
-    <eval expected="2000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[9]/@space-start"/>
-    <eval expected="2000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[9]/@space-end"/>
-    <eval expected="0 0 0 0" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[9]/@bap"/>
-    <eval expected="356000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[9]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[9]/@bpda"/>
+    <eval expected="2000" xpath="//flow/block[8]/@space-start"/>
+    <eval expected="2000" xpath="//flow/block[8]/@space-end"/>
+    <eval expected="0 0 0 0" xpath="//flow/block[8]/@bap"/>
+    <eval expected="356000" xpath="//flow/block[8]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[8]/@bpd"/>
+    <eval expected="18400" xpath="//flow/block[8]/@bpda"/>
     <!--     space after block -->
-    <eval expected="3000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[10]/@bpd"/>
+    <eval expected="3000" xpath="//flow/block[8]/@space-after"/>
   </checks>
 </testcase>
index 73b430aa64dab803577d0f4d90f1a553b79539d1..e64750785da7a7e18777f4e21c4c124c930f9d75 100644 (file)
   </fo>\r
   <checks>\r
     <element-list category="breaker">\r
-      <box w="30000"/>\r
+      <box w="0"/>\r
+      <penalty w="0" p="INF"/>\r
+      <glue w="30000" aux="true"/>\r
+      \r
       <box w="14400"/>\r
-      <penalty w="30000" p="0"/> <!-- w="30000" is for the padding-after -->\r
-      <glue w="-30000" aux="true"/> <!-- get's discarded if a break happens on the penalty above -->\r
+      \r
+      <glue w="30000" aux="true"/> <!-- w="30000" is for the padding-after -->\r
+      <penalty w="0" p="0"/>\r
+      <glue w="-60000" aux="true"/> <!-- difference between break and no-break situation -->\r
       <box w="0"/>\r
       <penalty w="0" p="INF"/>\r
       <glue w="30000" aux="true"/> <!-- w="30000" is for the padding-before -->\r
+      \r
       <box w="14400"/>\r
-      <penalty w="30000" p="0"/>\r
-      <glue w="-30000" aux="true"/>\r
+      \r
+      <glue w="30000" aux="true"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="-60000" aux="true"/>\r
       <box w="0"/>\r
       <penalty w="0" p="INF"/>\r
       <glue w="30000" aux="true"/>\r
+      \r
       <box w="14400"/>\r
-      <penalty w="30000" p="0"/>\r
-      <glue w="-30000" aux="true"/>\r
+\r
+      <glue w="30000" aux="true"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="-60000" aux="true"/>\r
       <box w="0"/>\r
       <penalty w="0" p="INF"/>\r
       <glue w="30000" aux="true"/>\r
+      \r
       <box w="14400"/>\r
-      <penalty w="30000" p="0"/>\r
-      <glue w="-30000" aux="true"/>\r
+\r
+      <glue w="30000" aux="true"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="-60000" aux="true"/>\r
       <box w="0"/>\r
       <penalty w="0" p="INF"/>\r
       <glue w="30000" aux="true"/>\r
+      \r
       <box w="14400"/>\r
-      <penalty w="30000" p="0"/>\r
-      <glue w="-30000" aux="true"/>\r
+\r
+      <glue w="30000" aux="true"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="-60000" aux="true"/>\r
       <box w="0"/>\r
       <penalty w="0" p="INF"/>\r
       <glue w="30000" aux="true"/>\r
+      \r
       <box w="14400"/>\r
-      <box w="30000"/>\r
+      \r
+      <box w="0"/>\r
+      <penalty w="0" p="INF"/>\r
+      <glue w="30000" aux="true"/>\r
+      \r
       <skip>3</skip>\r
     </element-list>\r
   </checks>\r
index 746cf15c965caa4f4184efce0f1e03dd056099ce..9c462b29cb17caf6a299e6c4e3658e81aa00b1d7 100644 (file)
   </fo>
   <checks>
     <!-- overlapping block1 -->
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@bpda"/>
+    <eval expected="360000" xpath="//flow/block[1]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[1]/@bpd"/>
+    <eval expected="6400" xpath="//flow/block[1]/@bpda"/>
     <!-- space after overlapping block1 -->
-    <eval expected="-8000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@bpd"/>
+    <eval expected="-8000" xpath="//flow/block[1]/@space-after"/>
     <!-- normal block1 -->
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@bpda"/>
+    <eval expected="360000" xpath="//flow/block[2]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[2]/@bpda"/>
     <!-- space before spaced block1 -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[3]/@space-before"/>
     <!-- spaced block1 -->
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@bpda"/>
+    <eval expected="360000" xpath="//flow/block[3]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[3]/@bpd"/>
+    <eval expected="19400" xpath="//flow/block[3]/@bpda"/>
     <!-- spaced block2 -->
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@bpda"/>
+    <eval expected="360000" xpath="//flow/block[4]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[4]/@bpd"/>
+    <eval expected="19400" xpath="//flow/block[4]/@bpda"/>
     <!-- space after spaced block2 -->
-    <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[7]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[4]/@space-after"/>
     <!-- normal block2 -->
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[8]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[8]/@bpda"/>
+    <eval expected="360000" xpath="//flow/block[5]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[5]/@bpda"/>
     <!-- space before overlapping block2 -->
-    <eval expected="-8000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[9]/@bpd"/>
+    <eval expected="-8000" xpath="//flow/block[6]/@space-before"/>
     <!-- overlapping block2 -->
-    <eval expected="360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[10]/@ipda"/>
-    <eval expected="14400" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[10]/@bpda"/>
+    <eval expected="360000" xpath="//flow/block[6]/@ipda"/>
+    <eval expected="14400" xpath="//flow/block[6]/@bpd"/>
+    <eval expected="6400" xpath="//flow/block[6]/@bpda"/>
   </checks>
 </testcase>
index 58b5a3e6f487f0be2baed71a8eb767478edf902b..14944f23239795254c5a3c1e7c32b89d362834b4 100644 (file)
@@ -28,7 +28,7 @@
           <fo:region-body/>
         </fo:simple-page-master>
       </fo:layout-master-set>
-      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+      <fo:page-sequence master-reference="normal" id="retain">
         <fo:flow flow-name="xsl-region-body">
           <fo:block space-before.optimum="20pt" space-before.conditionality="retain" space-after.optimum="10pt" space-after.conditionality="retain" text-align="justify">
 In olden times when wishing still helped one, there lived a king whose daughters 
@@ -44,7 +44,7 @@ Two blocks, testing conditionality="retain".
           </fo:block>
         </fo:flow>
       </fo:page-sequence>
-      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+      <fo:page-sequence master-reference="normal" id="discard">
         <fo:flow flow-name="xsl-region-body">
           <fo:block space-before.optimum="20pt" space-before.conditionality="discard" space-after.optimum="10pt" space-after.conditionality="discard" text-align="justify">
 In olden times when wishing still helped one, there lived a king whose daughters 
@@ -63,5 +63,96 @@ Two blocks, testing conditionality="discard".
     </fo:root>
   </fo>
   <checks>
+    <element-list category="breaker" id="retain">
+      <box w="0"/> <!-- Helper box bearing the SpaceHandlingPosition and making sure the glue gets processed -->
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000" y="0" z="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000" y="0" z="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000" y="0" z="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000" y="0" z="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      
+      <!-- skip three more lines -->
+      <skip>8</skip>
+      <skip>8</skip>
+      <skip>8</skip>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000" y="0" z="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000" y="0" z="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000" y="0" z="20000"/>
+      
+      <box w="14400"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="10000" aux="true"/>
+      <penalty w="0" p="0"/>
+      <glue w="-10000" aux="true"/>
+      
+      <box w="0" aux="true"/>
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="10000" aux="true"/>
+      
+      <box w="14400"/> <!-- second block -->
+      
+      <box w="0" aux="true"/>
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="20000" aux="true"/>
+      
+      <box w="0" aux="true"/> <!-- This is used to make sure the preceding glue is not cut off -->
+      
+      <skip>3</skip>
+    </element-list>
+    <element-list category="breaker" id="discard">
+      <box w="0"/> <!-- Helper box used to notify the LM for the addAreas stage about the discarded spaces -->
+      <box w="14400"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <glue w="10000"/>
+      
+      <box w="14400"/> <!-- second block -->
+      
+      <box w="0"/> <!-- SpaceHandlingPosition-bearing helper box -->
+      
+      <box w="0"/> <!-- This is used to make sure the preceding glue is not cut off -->
+      
+      <skip>3</skip>
+    </element-list>
   </checks>
 </testcase>
index a58c831a3b7809ae6b22651fb624bc072302f0ad..0c59ec68fc490f819ca8aa6cddee9b82ed465f32 100644 (file)
@@ -46,7 +46,7 @@
     <element-list category="breaker">\r
       <box w="0"/>\r
       <penalty w="0" p="INF"/>\r
-      <glue w="5000" aux="true"/>\r
+      <glue w="5000"/>\r
       <box w="14400"/>\r
       <box w="14400"/>\r
       <skip>3</skip>\r
diff --git a/test/layoutengine/testcases/block_space-before_space-after_4.xml b/test/layoutengine/testcases/block_space-before_space-after_4.xml
new file mode 100644 (file)
index 0000000..3d4fb9f
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 block-level space properties. Demonstrates that spaces are repeated on every generated area.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="30pt">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body" line-height="10pt" font-size="9pt">
+          <fo:block space-before="5pt" space-before.conditionality="retain" background-color="yellow">
+             <fo:block>line 1</fo:block>
+             <fo:block>line 2</fo:block>
+             <fo:block>line 3</fo:block>
+             <fo:block>line 4</fo:block>
+             <fo:block>line 5</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker">
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-5000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-5000"/>
+
+      <!-- skip two more lines -->
+      <skip>6</skip>
+      <skip>6</skip>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="5000"/>
+      <box w="10000"/>
+      
+      <skip>3</skip>
+    </element-list>
+    <eval expected="3" xpath="count(//pageViewport)"/>
+    <eval expected="5000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="5000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="5000" xpath="//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block)"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block)"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block)"/>
+    <eval expected="2" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block)"/>
+    <eval expected="2" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block)"/>
+    <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block)"/>
+    
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/block_space-before_space-after_5.xml b/test/layoutengine/testcases/block_space-before_space-after_5.xml
new file mode 100644 (file)
index 0000000..5a7beac
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 block-level space properties. These here are the 
+      <a href="http://wiki.apache.org/xmlgraphics-fop/SpaceResolution/Examples">examples 3 to 5 on the Wiki</a>.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="1in">
+          <fo:region-body background-color="lightgray"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" id="cond-cond">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block space-after="11pt">block 1: space-after conditional</fo:block>
+          <fo:block space-before="12pt">block 2: space-before conditional</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="normal" id="retain-cond">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block space-after="11pt" space-after.conditionality="retain">block 1: space-after retained</fo:block>
+          <fo:block space-before="12pt">block 2: space-before: conditional</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="normal" id="retain-cond-2">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block space-after="10pt" space-after.conditionality="retain">block 1: space-after retained</fo:block>
+          <fo:block space-before="10pt">block 2: space-before: conditional</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="normal" id="retain-retain">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block space-after="11pt" space-after.conditionality="retain">block 1: space-after retained</fo:block>
+          <fo:block space-before="12pt" space-before.conditionality="retain">block 2: space-before retained</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker" id="cond-cond">
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <glue w="12000"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+    <element-list category="breaker" id="retain-cond">
+      <box w="14400"/>
+      <penalty w="0" p="INF"/>
+      <glue w="11000"/>
+      <penalty w="0" p="0"/>
+      <glue w="1000"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+    <element-list category="breaker" id="retain-cond-2">
+      <box w="14400"/>
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+    <element-list category="breaker" id="retain-retain">
+      <box w="14400"/>
+      <penalty w="0" p="INF"/>
+      <glue w="11000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-11000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="12000"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/block_space-before_space-after_6.xml b/test/layoutengine/testcases/block_space-before_space-after_6.xml
new file mode 100644 (file)
index 0000000..7b67372
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 block-level space properties. These here are the 
+      <a href="http://wiki.apache.org/xmlgraphics-fop/SpaceResolution/Examples">examples 1 and 2 on the Wiki</a>.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="1in">
+          <fo:region-body background-color="lightgray"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" id="ex1">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block>first line</fo:block>
+          <fo:block space-before="10pt">
+            <fo:block>before break</fo:block>
+            <fo:block>after break</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="normal" id="ex2">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block>first line</fo:block>
+          <fo:block space-before="10pt" space-before.conditionality="retain">
+            <fo:block>before break</fo:block>
+            <fo:block>after break</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker" id="ex1">
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="10000"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <box w="14400"/>
+      
+      <skip>3</skip>
+    </element-list>
+    
+    <element-list category="breaker" id="ex2">
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      
+      <box w="14400"/>
+
+      <penalty w="0" p="0"/>
+
+      <glue w="-10000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+
+      <box w="14400"/>
+      
+      <skip>3</skip>
+    </element-list>
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/block_space-before_space-after_7.xml b/test/layoutengine/testcases/block_space-before_space-after_7.xml
new file mode 100644 (file)
index 0000000..4387626
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 block-level space properties. These here are the 
+      <a href="http://wiki.apache.org/xmlgraphics-fop/SpaceResolution/Examples">examples 1 and 2 on the Wiki</a>.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="1in">
+          <fo:region-body background-color="lightgray"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" id="ex8">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block space-before="10pt" padding-before="5pt" border-before-style="solid" border-before-width="2pt">
+            first line
+            <fo:block space-before="6pt">second line</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker" id="ex8">
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="7000"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="6000"/>
+      <box w="14400"/>
+      <skip>3</skip>
+    </element-list>
+  </checks>
+</testcase>
index a5c6f6f7abcde90aa61cf6a8bd3c599f6126b8f2..02c72b118f41efe8950aa823057d9acc5b6971a7 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/char/@baseline"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea/char/@offset"/>
+    <eval expected="5560" xpath="//flow/block[1]/lineArea/char/@ipd"/>
+    <eval expected="7560" xpath="//flow/block[1]/lineArea/char/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-start"/>
+
     <eval expected="7180" xpath="//flow/block[2]/lineArea/char/@baseline"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea/char/@offset"/>
     <eval expected="5560" xpath="//flow/block[2]/lineArea/char/@ipd"/>
-    <eval expected="7560" xpath="//flow/block[2]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-start"/>
-
-    <eval expected="7180" xpath="//flow/block[5]/lineArea/char/@baseline"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea/char/@offset"/>
-    <eval expected="5560" xpath="//flow/block[5]/lineArea/char/@ipd"/>
-    <eval expected="25560" xpath="//flow/block[5]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-start"/>
+    <eval expected="25560" xpath="//flow/block[2]/lineArea/char/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-start"/>
 
-    <eval expected="7180" xpath="//flow/block[8]/lineArea/char/@baseline"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/char/@offset"/>
-    <eval expected="5000" xpath="//flow/block[8]/lineArea/char/@ipd"/>
-    <eval expected="17000" xpath="//flow/block[8]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/char/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea/char/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea/char/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[8]/lineArea/char/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[8]/lineArea/char/@padding-start"/>
+    <eval expected="7180" xpath="//flow/block[3]/lineArea/char/@baseline"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/char/@offset"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea/char/@ipd"/>
+    <eval expected="17000" xpath="//flow/block[3]/lineArea/char/@ipda"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[3]/lineArea/char/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/char/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[3]/lineArea/char/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[3]/lineArea/char/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea/char/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea/char/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea/char/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[3]/lineArea/char/@padding-start"/>
 
-    <eval expected="5744" xpath="//flow/block[11]/lineArea/char/@baseline"/>
-    <eval expected="8616" xpath="//flow/block[11]/lineArea/char/@offset"/>
-    <eval expected="4448" xpath="//flow/block[11]/lineArea/char/@ipd"/>
-    <eval expected="24448" xpath="//flow/block[11]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-start"/>
+    <eval expected="5744" xpath="//flow/block[4]/lineArea/char/@baseline"/>
+    <eval expected="8616" xpath="//flow/block[4]/lineArea/char/@offset"/>
+    <eval expected="4448" xpath="//flow/block[4]/lineArea/char/@ipd"/>
+    <eval expected="24448" xpath="//flow/block[4]/lineArea/char/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-start"/>
   </checks>
 </testcase>
index 60f15505e14c1d75606a55a1325391689d861d20..125d56fb0f83ab4d23e92bc27669458b516cd70e 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/char/@offset"/>
     <eval expected="7180" xpath="//flow/block[2]/lineArea/char/@offset"/>
-    <eval expected="7180" xpath="//flow/block[5]/lineArea/char/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/char/@offset"/>
-    <eval expected="4565" xpath="//flow/block[11]/lineArea/char/@offset"/>
-    <eval expected="9250" xpath="//flow/block[14]/lineArea/char/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/char/@offset"/>
+    <eval expected="4565" xpath="//flow/block[4]/lineArea/char/@offset"/>
+    <eval expected="9250" xpath="//flow/block[5]/lineArea/char/@offset"/>
   </checks>
 </testcase>
index ac6a6233f5cd82328d93d3977fa4711a6495f14a..1ad390a53165d614acccaced785f698c3d2dbd9e 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="10052" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="10052" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="10052" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="5427" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="5487" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="802" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="802" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="802" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="8616" xpath="//flow/block[12]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="6462" xpath="//flow/block[13]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="10052" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="5427" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="5487" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="802" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="802" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="802" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="8616" xpath="//flow/block[35]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="6462" xpath="//flow/block[38]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="10052" xpath="//flow/block[41]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="802" xpath="//flow/block[44]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="10052" xpath="//flow/block[47]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="802" xpath="//flow/block[50]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="802" xpath="//flow/block[15]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="10052" xpath="//flow/block[16]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="802" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
   </checks>
 </testcase>
index fd21545b2362fa6a72f8a9641bbd5d1862bfdc49..d8d766e50498d253fcd6bdbaf02d0b45198daf3d 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="12950" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[1]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[1]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+    
     <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-after"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="13078" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-after"/>
-    <eval expected="128" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="128" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="13078" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[3]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[3]/lineArea[1]/@space-after"/>
+    <eval expected="128" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="128" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="15122" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="15122" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[4]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[4]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5872" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="13678" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-after"/>
-    <eval expected="728" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="728" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="13678" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/>
+    <eval expected="728" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="728" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="15722" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="6472" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="15722" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[6]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[6]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="6472" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 128fd6b001c94083b1b5a38719584c60e81ceafc..9b514c7f4b558156a05bf6e7917c4da502146f82 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="1850" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="1826" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="574" xpath="//flow/block[12]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="1436" xpath="//flow/block[13]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="1850" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="1826" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="574" xpath="//flow/block[35]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="1436" xpath="//flow/block[38]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[41]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[44]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[47]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[50]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[15]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[16]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
   </checks>
 </testcase>
index f5559f4359bf53d971297ad5e8260cb546b37598..591ee2c9b7b8b89b3a512f7bb452f95ae96b243e 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="1850" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="1850" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="1850" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="1850" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="1826" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="1826" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="1826" xpath="//flow/block[7]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="1826" xpath="//flow/block[7]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[9]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[9]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="3700" xpath="//flow/block[29]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[29]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[10]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[10]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="574" xpath="//flow/block[35]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="574" xpath="//flow/block[35]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="574" xpath="//flow/block[12]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="574" xpath="//flow/block[12]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="1436" xpath="//flow/block[38]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="1436" xpath="//flow/block[38]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="1436" xpath="//flow/block[13]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="1436" xpath="//flow/block[13]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="0" xpath="//flow/block[41]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[41]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="0" xpath="//flow/block[44]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[44]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[15]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[15]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="0" xpath="//flow/block[47]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[47]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[16]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[16]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="3700" xpath="//flow/block[50]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[50]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 77cc0716778abaf2af77385a9bc41483a734d87b..3d32b3595f7a2d6b5a9aaf2c0c0c77e5b4142c97 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent[2]/@offset"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="1436" xpath="//flow/block[14]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="2361" xpath="//flow/block[17]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="2349" xpath="//flow/block[20]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[23]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="3286" xpath="//flow/block[26]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="3286" xpath="//flow/block[29]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="1723" xpath="//flow/block[35]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="2154" xpath="//flow/block[38]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[41]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[44]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="1436" xpath="//flow/block[47]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="3286" xpath="//flow/block[50]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[3]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="1436" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="2361" xpath="//flow/block[6]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="2349" xpath="//flow/block[7]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="3286" xpath="//flow/block[9]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="3286" xpath="//flow/block[10]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="1723" xpath="//flow/block[12]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="2154" xpath="//flow/block[13]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[15]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="1436" xpath="//flow/block[16]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="3286" xpath="//flow/block[17]/lineArea[1]/inlineparent[2]/@offset"/>
   </checks>
 </testcase>
index 794c81e5a2a4de93ce1b866ebc42a4e66be09050..4268c123906bd4f49c1ac448ee667ea0b8488226 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="22200" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="8616" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-4308" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+
     <eval expected="22200" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
     <eval expected="8616" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
 
+    <eval expected="22200" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="1723" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="6494" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="22200" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="1723" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="2739" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
+
     <eval expected="22200" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="8616" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-4308" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="5550" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="22200" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="1723" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="6494" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="22200" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="1723" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="2739" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="22200" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="5550" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="27750" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-5550" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="27750" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-5550" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="22200" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="8325" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-8325" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="4308" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="22200" xpath="//flow/block[20]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="8325" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-8325" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="4308" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="22491" xpath="//flow/block[23]/lineArea[1]/@bpd"/>
-    <eval expected="291" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="8616" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="-8616" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
-    <eval expected="291" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="22491" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
+    <eval expected="291" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="8616" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="-8616" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
+    <eval expected="291" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="22200" xpath="//flow/block[26]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="8325" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="-6462" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="22200" xpath="//flow/block[9]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="8325" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="-6462" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="27750" xpath="//flow/block[29]/lineArea[1]/@bpd"/>
-    <eval expected="5550" xpath="//flow/block[29]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-5550" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="5550" xpath="//flow/block[29]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="27750" xpath="//flow/block[10]/lineArea[1]/@bpd"/>
+    <eval expected="5550" xpath="//flow/block[10]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-5550" xpath="//flow/block[10]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="5550" xpath="//flow/block[10]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 7b5fcdb03c4deeeec9e3ca04312de4f130d9f0d0..ee56f58ed99987153463ae46ab753e60de4d67c8 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="90040" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/inlineparent/@background"/>
+
     <eval expected="90040" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/>
     <eval expected="color=#ffff00" xpath="//flow/block[2]/lineArea/inlineparent/@background"/>
 
-    <eval expected="90040" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea/inlineparent/@background"/>
-
-    <eval expected="90040" xpath="//flow/block[8]/lineArea/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea/inlineparent/@background"/>
+    <eval expected="90040" xpath="//flow/block[3]/lineArea/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[3]/lineArea/inlineparent/@background"/>
 
-    <eval expected="90040" xpath="//flow/block[11]/lineArea/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[11]/lineArea/inlineparent/@background"/>
+    <eval expected="90040" xpath="//flow/block[4]/lineArea/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[4]/lineArea/inlineparent/@background"/>
 
-    <eval expected="188950" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[14]/lineArea[1]/inlineparent/@background"/>
-    <eval expected="313470" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[14]/lineArea[2]/inlineparent/@background"/>
-    <eval expected="145610" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[14]/lineArea[3]/inlineparent/@background"/>
+    <eval expected="188950" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea[1]/inlineparent/@background"/>
+    <eval expected="313470" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea[2]/inlineparent/@background"/>
+    <eval expected="145610" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea[3]/inlineparent/@background"/>
 
-    <eval expected="188950" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[17]/lineArea[1]/inlineparent/@background"/>
-    <eval expected="313470" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[17]/lineArea[2]/inlineparent/@background"/>
-    <eval expected="109650" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[17]/lineArea[3]/inlineparent/@background"/>
+    <eval expected="188950" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[6]/lineArea[1]/inlineparent/@background"/>
+    <eval expected="313470" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[6]/lineArea[2]/inlineparent/@background"/>
+    <eval expected="109650" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[6]/lineArea[3]/inlineparent/@background"/>
 
-    <eval expected="199793" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[20]/lineArea[1]/inlineparent/@background"/>
-    <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[20]/lineArea[2]/inlineparent/@background"/>
-    <eval expected="118530" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[20]/lineArea[3]/inlineparent/@background"/>
+    <eval expected="199793" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[7]/lineArea[1]/inlineparent/@background"/>
+    <eval expected="350000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[7]/lineArea[2]/inlineparent/@background"/>
+    <eval expected="118530" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[7]/lineArea[3]/inlineparent/@background"/>
 
-    <eval expected="128370" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[23]/lineArea[1]/inlineparent/@background"/>
-    <eval expected="269560" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[23]/lineArea[2]/inlineparent/@background"/>
-    <eval expected="225250" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[23]/lineArea[3]/inlineparent/@background"/>
+    <eval expected="128370" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea[1]/inlineparent/@background"/>
+    <eval expected="269560" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea[2]/inlineparent/@background"/>
+    <eval expected="225250" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea[3]/inlineparent/@background"/>
 
-    <eval expected="151184" xpath="//flow/block[26]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[26]/lineArea[1]/inlineparent/@background"/>
-    <eval expected="81704" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@ipd"/>
-    <eval expected="161644" xpath="//flow/block[26]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="color=#ffff00" xpath="//flow/block[26]/lineArea[2]/inlineparent/@background"/>
-    <eval expected="67704" xpath="//flow/block[26]/lineArea[2]/inlineparent/inlineparent/@ipd"/>
+    <eval expected="151184" xpath="//flow/block[9]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[9]/lineArea[1]/inlineparent/@background"/>
+    <eval expected="81704" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/@ipd"/>
+    <eval expected="161644" xpath="//flow/block[9]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[9]/lineArea[2]/inlineparent/@background"/>
+    <eval expected="67704" xpath="//flow/block[9]/lineArea[2]/inlineparent/inlineparent/@ipd"/>
   </checks>
 </testcase>
index 723abfc9d912e3d7b1dad8e47bacec1eaa29c2e9..591e337565d5e2559d966bdf584c25e63e0fae78 100755 (executable)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
+    <eval expected="12950" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[1]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[1]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="14737" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="5487" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="14737" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
+    <eval expected="17400" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[3]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[3]/lineArea[1]/@space-after"/>
+    <eval expected="4450" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="4450" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="12950" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[4]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[4]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5487" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="17400" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
+    <eval expected="13078" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[6]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[6]/lineArea[1]/@space-after"/>
+    <eval expected="128" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="128" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="15122" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[7]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[7]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5872" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="15118" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-after"/>
-    <eval expected="4450" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2168" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="4450" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="12950" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="13078" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-after"/>
-    <eval expected="128" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="128" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="15122" xpath="//flow/block[20]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5872" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="15118" xpath="//flow/block[23]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-after"/>
-    <eval expected="2168" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2168" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="2168" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="17162" xpath="//flow/block[26]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="7912" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="17162" xpath="//flow/block[9]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[9]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[9]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="7912" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 6bc6d60bc2416841f7007db820e27f6fc1418f0c..5e7b276b723a444b2195420a5c712e630318b4c1 100755 (executable)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="16415" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
+    <eval expected="16415" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5487" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="3528" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="14737" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
     <eval expected="5487" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="3528" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="-3794" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="14737" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5487" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="21194" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="8244" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3794" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-3794" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="8244" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="17400" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="4450" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="3528" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="4450" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="15118" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
+    <eval expected="2168" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-3794" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="7436" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="21194" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
-    <eval expected="8244" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3794" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-3794" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="8244" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="2168" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="17400" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="4450" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="3528" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="4450" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="15118" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="2168" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="7436" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="2168" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="39060" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="25086" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="14892" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="1968" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="-16860" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="25086" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="39060" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="25086" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="14892" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="1968" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="-16860" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="25086" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
+
index eee8906b785e452ca972e27809bf55006c82ec1a..10f745a180577c1b57f8dde185367b4537d54fce 100755 (executable)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="14846" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
+    <eval expected="14846" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="1826" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="5620" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
     <eval expected="1826" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="5620" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="-1702" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-1750" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="13400" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="6000" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
     
     <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
     <eval expected="1826" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-1702" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="3528" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
+    
+    <eval expected="14918" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="1968" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3794" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-3794" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="1968" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="12950" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-2992" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[2]/@offset"/>
+    
+    <eval expected="17708" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-1750" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="10308" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="13400" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="6000" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="1826" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="3528" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="14918" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="1968" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3794" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-3794" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="1968" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="12950" xpath="//flow/block[20]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-2992" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="17708" xpath="//flow/block[23]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="10308" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 87055ac0e76c719d6db027b0278ac6859e4085c8..c0ade7fbe611be9012286fec275fb8c0d0619322 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="17100" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="2300" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent[1]/text[1]/@offset"/>
+    <eval expected="6000" xpath="//flow/block[1]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent[2]/text[1]/@offset"/>
+    <eval expected="2300" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+    
     <eval expected="17100" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
-    <eval expected="2300" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="9700" xpath="//flow/block[2]/lineArea[1]/inlineparent[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent[1]/text[1]/@offset"/>
-    <eval expected="6000" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/text[1]/@offset"/>
-    <eval expected="2300" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
-    
-    <eval expected="17100" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="9700" xpath="//flow/block[5]/lineArea[1]/inlineparent[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="16892" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5792" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="1436" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="16892" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5792" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="1436" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="23168" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="8368" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="3700" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-3700" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="5136" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="8368" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="23168" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="8368" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3700" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-3700" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="5136" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="8368" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="14800" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5792" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-2872" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="14800" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5792" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
     
-    <eval expected="22340" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="7540" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="2872" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-2872" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/>
-    <eval expected="7540" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="22340" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="7540" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="2872" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-2872" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[2]/@offset"/>
+    <eval expected="7540" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 08cabc67c4f4eadbc3e961b90e7572917f4e4971..609a0962559210e7be32420e22ba1e18bc170856 100644 (file)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="48350" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/>
-    <eval expected="50350" xpath="//flow/block[2]/lineArea/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[2]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-start"/>
+    <eval expected="48350" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/>
+    <eval expected="50350" xpath="//flow/block[1]/lineArea/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-start"/>
     
-    <eval expected="208190" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/>
-    <eval expected="228190" xpath="//flow/block[5]/lineArea/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-start"/>
+    <eval expected="208190" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/>
+    <eval expected="228190" xpath="//flow/block[2]/lineArea/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[2]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/inlineparent/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/inlineparent/@padding-start"/>
     
-    <eval expected="151170" xpath="//flow/block[8]/lineArea/inlineparent/@ipd"/>
-    <eval expected="163170" xpath="//flow/block[8]/lineArea/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-start"/>
+    <eval expected="151170" xpath="//flow/block[3]/lineArea/inlineparent/@ipd"/>
+    <eval expected="163170" xpath="//flow/block[3]/lineArea/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[3]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[3]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[3]/lineArea/inlineparent/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea/inlineparent/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea/inlineparent/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[3]/lineArea/inlineparent/@padding-start"/>
     
-    <eval expected="64464" xpath="//flow/block[11]/lineArea/inlineparent/@ipd"/>
-    <eval expected="84464" xpath="//flow/block[11]/lineArea/inlineparent/@ipda"/>
-    <eval expected="8616" xpath="//flow/block[11]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-start"/>
+    <eval expected="64464" xpath="//flow/block[4]/lineArea/inlineparent/@ipd"/>
+    <eval expected="84464" xpath="//flow/block[4]/lineArea/inlineparent/@ipda"/>
+    <eval expected="8616" xpath="//flow/block[4]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/inlineparent/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/inlineparent/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/inlineparent/@padding-start"/>
     
-    <eval expected="340710" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="343710" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="2000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/>
-    <eval expected="193840" xpath="//flow/block[14]/lineArea[4]/inlineparent/@ipd"/>
-    <eval expected="196840" xpath="//flow/block[14]/lineArea[4]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[4]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[4]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[4]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[4]/inlineparent/@border-end"/>
-    <eval expected="2000" xpath="//flow/block[14]/lineArea[4]/inlineparent/@padding-end"/>
+    <eval expected="340710" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="343710" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="2000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/>
+    <eval expected="193840" xpath="//flow/block[5]/lineArea[4]/inlineparent/@ipd"/>
+    <eval expected="196840" xpath="//flow/block[5]/lineArea[4]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[4]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[4]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[4]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[4]/inlineparent/@border-end"/>
+    <eval expected="2000" xpath="//flow/block[5]/lineArea[4]/inlineparent/@padding-end"/>
     
-    <eval expected="118830" xpath="//flow/block[17]/lineArea/inlineparent/@ipd"/>
-    <eval expected="126830" xpath="//flow/block[17]/lineArea/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-start"/>
-    <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/@padding-end"/>
-    <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/@padding-start"/>
-    <eval expected="78930" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@ipd"/>
-    <eval expected="84930" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@offset"/>
-    <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-after"/>
-    <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-before"/>
-    <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-end"/>
-    <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-start"/>
-    <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@padding-end"/>
-    <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@padding-start"/>
+    <eval expected="118830" xpath="//flow/block[6]/lineArea/inlineparent/@ipd"/>
+    <eval expected="126830" xpath="//flow/block[6]/lineArea/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-start"/>
+    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/@padding-end"/>
+    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/@padding-start"/>
+    <eval expected="78930" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@ipd"/>
+    <eval expected="84930" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@offset"/>
+    <eval expected="(solid,#008000,1000)" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@border-after"/>
+    <eval expected="(solid,#008000,1000)" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@border-before"/>
+    <eval expected="(solid,#008000,1000)" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@border-end"/>
+    <eval expected="(solid,#008000,1000)" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@border-start"/>
+    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@padding-end"/>
+    <eval expected="2000" xpath="//flow/block[6]/lineArea/inlineparent/inlineparent/@padding-start"/>
   </checks>
 </testcase>
index 744b6b33f1ce50d3f002fdf86ca3f4d26e40e962..86284f868298360cab946f7eb1ed3d767f09bb98 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="255100" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="265100" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="335720" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="345720" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="35570" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="45570" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-start"/>
+    
     <eval expected="255100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="265100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-start"/>
     
+    <eval expected="259229" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="269229" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="340000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="35570" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="45570" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-start"/>
+    
+    <eval expected="216190" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="226190" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="299050" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="309050" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="111150" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="121150" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-start"/>
+    
     <eval expected="255100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="265100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="261100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/>
     <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="345720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-start"/>
     <eval expected="35570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="45570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="39570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/>
     
-    <eval expected="259229" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="269229" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="255100" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="261100" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="335720" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="335720" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="35570" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="39570" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-end"/>
+    
+    <eval expected="262613" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="268613" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="350000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="35570" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="39570" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-end"/>
+    
+    <eval expected="216190" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="222190" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="340000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="310170" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="310170" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="35570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="45570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="100030" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="104030" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="216190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="226190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="299050" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="309050" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="111150" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="121150" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="255100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="261100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="335720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="335720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="35570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="39570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/>
-    
-    <eval expected="255100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="261100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="335720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="335720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="35570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="39570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/>
-    
-    <eval expected="262613" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="268613" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="35570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="39570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-end"/>
-    
-    <eval expected="216190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="222190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="310170" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="310170" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="100030" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="104030" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-end"/>
   </checks>
 </testcase>
index bb9b50ab50f5d34d4f064410b7eab18e8636202a..3e2d4a9b9fc43e8ec030f64156db0dd59083dfba 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="255100" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="264100" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="335720" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="343720" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="35570" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="44570" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-start"/>
+
     <eval expected="255100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="264100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-start"/>
 
-    <eval expected="255100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="264100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="260075" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="269075" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="342000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="35570" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="44570" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-start"/>
+
+    <eval expected="237870" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="246870" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="317940" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="325940" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="70580" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="79580" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-start"/>
+
+    <eval expected="183960" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="193960" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="343720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="255680" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="265680" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="35570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="44570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="186750" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="196750" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/>
 
-    <eval expected="260075" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="269075" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="342000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="35570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="44570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-start"/>
-
-    <eval expected="237870" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="246870" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="317940" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="325940" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="70580" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="79580" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-start"/>
-
-    <eval expected="183960" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="193960" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="255680" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="265680" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="186750" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="196750" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/>
-
-    <eval expected="172840" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="178840" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="266800" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="266800" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="186750" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="190750" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="172840" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="178840" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="266800" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="266800" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="186750" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="190750" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-end"/>
   </checks>
 </testcase>
index b2a0444adae53ca1f4f4ac3bbd75958054548ce4..d55fdc934881a9f1ba9ca2b29b5187942549a827 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="255100" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="261100" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="335720" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="335720" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="35570" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="39570" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-end"/>
+    
     <eval expected="255100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="261100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/>
     
+    <eval expected="262613" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="268613" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="35570" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="39570" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+    
+    <eval expected="216190" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="222190" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="310170" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="310170" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="100030" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="104030" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-end"/>
+
     <eval expected="255100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="261100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="265100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/>
     <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="345720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-start"/>
     <eval expected="35570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="39570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="45570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/>
+    
+    <eval expected="255100" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="265100" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="335720" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="345720" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="35570" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="45570" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-start"/>
+    
+    <eval expected="259229" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="269229" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="340000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="35570" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="45570" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-start"/>
     
-    <eval expected="262613" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="268613" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="216190" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="226190" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="299050" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="309050" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="35570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="39570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="3000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="111150" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="121150" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/>
-    
-    <eval expected="216190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="222190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="310170" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="310170" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="100030" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="104030" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/>
-
-    <eval expected="255100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="265100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="335720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="345720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="35570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="45570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="255100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="265100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="335720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="345720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="35570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="45570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="259229" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="269229" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="340000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="35570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="45570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="216190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="226190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="299050" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="309050" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="111150" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="121150" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-start"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-start"/>
   </checks>
 </testcase>
index 06bfae0ea4d52e90e2c28919d8bba87332ed9f6f..48750c06e75680c9ea69ce617415a44a56028788 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="250110" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="256110" xpath="//flow/block[1]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[1]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="348490" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="348490" xpath="//flow/block[1]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="91710" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="95710" xpath="//flow/block[1]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[1]/lineArea[3]/inlineparent/@padding-end"/>
+    
     <eval expected="250110" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="256110" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/>
     
+    <eval expected="250110" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="256110" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="349999" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="349999" xpath="//flow/block[3]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="91710" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="95710" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+    
+    <eval expected="238440" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="244440" xpath="//flow/block[4]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="320690" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="320690" xpath="//flow/block[4]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="131180" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="135180" xpath="//flow/block[4]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea[3]/inlineparent/@padding-end"/>
+
     <eval expected="250110" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="256110" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="260110" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="348490" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="348490" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="336820" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="346820" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="91710" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="95710" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="3000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="103380" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="113380" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/>
+    
+    <eval expected="250110" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="260110" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="336820" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="346820" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="103380" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="113380" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[6]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea[3]/inlineparent/@padding-start"/>
+    
+    <eval expected="250110" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="260110" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[1]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[1]/inlineparent/@padding-start"/>
+    <eval expected="340000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[2]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[2]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="103380" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="113380" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[7]/lineArea[3]/inlineparent/@border-start"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea[3]/inlineparent/@padding-start"/>
     
-    <eval expected="250110" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="256110" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
+    <eval expected="238440" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
+    <eval expected="248440" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/>
+    <eval expected="3000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-end"/>
     <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="349999" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="349999" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
+    <eval expected="320690" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
+    <eval expected="330690" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="91710" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="95710" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
+    <eval expected="3000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-start"/>
+    <eval expected="131180" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="141180" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-start"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/>
     <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/>
-    
-    <eval expected="238440" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="244440" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="320690" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="320690" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="131180" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="135180" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/>
-
-    <eval expected="250110" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="260110" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="336820" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="346820" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="103380" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="113380" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="250110" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="260110" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="336820" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="346820" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="103380" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="113380" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="250110" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="260110" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="340000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="103380" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="113380" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-start"/>
-    
-    <eval expected="238440" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/>
-    <eval expected="248440" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-start"/>
-    <eval expected="320690" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/>
-    <eval expected="330690" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[2]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-start"/>
-    <eval expected="131180" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="141180" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[3]/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="3000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-start"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-start"/>
   </checks>
 </testcase>
index 550bca8cb16e65375f86a3fb0bfb9da9bb5279e4..e812bc3876689098bfdcef1ac84560369a169081 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="12950" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[1]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[1]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
     <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
+    <eval expected="12950" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[3]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[3]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[4]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[4]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="2872" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
     <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="574" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[6]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[6]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="1436" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[7]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[7]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="1850" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
     <eval expected="12950" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
     <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-before"/>
     <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="574" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="1436" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[20]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="1850" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[23]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="1826" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="1826" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
-    <eval expected="12950" xpath="//flow/block[26]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="12950" xpath="//flow/block[9]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[9]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[9]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="3700" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
-    <eval expected="12950" xpath="//flow/block[29]/lineArea[1]/@bpd"/>
-    <eval expected="1925" xpath="//flow/block[29]/lineArea[1]/@space-before"/>
-    <eval expected="1925" xpath="//flow/block[29]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="12950" xpath="//flow/block[10]/lineArea[1]/@bpd"/>
+    <eval expected="1925" xpath="//flow/block[10]/lineArea[1]/@space-before"/>
+    <eval expected="1925" xpath="//flow/block[10]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/inlineparent/@offset"/>
   </checks>
 </testcase>
index 1d863bfc1e83c99cc85e0ba41c72898208462304..f382e8aa3e0bcf8d805df25ca2ff9fe29c73967a 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="12950" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[1]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[1]/lineArea[1]/@space-after"/>
+    <eval expected="2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-2872" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
     <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="1375" xpath="//flow/block[2]/lineArea[1]/@space-before"/>
     <eval expected="1375" xpath="//flow/block[2]/lineArea[1]/@space-after"/>
     <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="-2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
+    <eval expected="12950" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[3]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[3]/lineArea[1]/@space-after"/>
+    <eval expected="3700" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-3700" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[4]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[4]/lineArea[1]/@space-after"/>
+    <eval expected="2872" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-2872" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
     <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
     <eval expected="1375" xpath="//flow/block[5]/lineArea[1]/@space-before"/>
     <eval expected="1375" xpath="//flow/block[5]/lineArea[1]/@space-after"/>
-    <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="574" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-574" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[6]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[6]/lineArea[1]/@space-after"/>
+    <eval expected="1436" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-1436" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+
+    <eval expected="12950" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[7]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[7]/lineArea[1]/@space-after"/>
+    <eval expected="1850" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-1850" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
     <eval expected="12950" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
     <eval expected="1375" xpath="//flow/block[8]/lineArea[1]/@space-before"/>
     <eval expected="1375" xpath="//flow/block[8]/lineArea[1]/@space-after"/>
-    <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[11]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[11]/lineArea[1]/@space-after"/>
-    <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[14]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[14]/lineArea[1]/@space-after"/>
-    <eval expected="574" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-574" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[17]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[17]/lineArea[1]/@space-after"/>
-    <eval expected="1436" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-1436" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[20]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[20]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[20]/lineArea[1]/@space-after"/>
-    <eval expected="1850" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-1850" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-
-    <eval expected="12950" xpath="//flow/block[23]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[23]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[23]/lineArea[1]/@space-after"/>
-    <eval expected="1826" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-1826" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="1826" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-1826" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
-    <eval expected="12950" xpath="//flow/block[26]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[26]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[26]/lineArea[1]/@space-after"/>
-    <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="-3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="12950" xpath="//flow/block[9]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[9]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[9]/lineArea[1]/@space-after"/>
+    <eval expected="3700" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="-3700" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/@offset"/>
 
-    <eval expected="12950" xpath="//flow/block[29]/lineArea[1]/@bpd"/>
-    <eval expected="1375" xpath="//flow/block[29]/lineArea[1]/@space-before"/>
-    <eval expected="1375" xpath="//flow/block[29]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="12950" xpath="//flow/block[10]/lineArea[1]/@bpd"/>
+    <eval expected="1375" xpath="//flow/block[10]/lineArea[1]/@space-before"/>
+    <eval expected="1375" xpath="//flow/block[10]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/inlineparent/@offset"/>
   </checks>
 </testcase>
index 8b1056f625dbdbe044730b11c9f43790ed41b751..4d09ad57b596830b076e91ea9d155fdb9a69bb24 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="14800" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5744" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="1850" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+
     <eval expected="14800" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
     <eval expected="5744" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="1850" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="14800" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5744" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="14800" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5744" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="14800" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5744" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-3700" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="15018" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5744" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/>
-    <eval expected="-1826" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="15018" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="5744" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
+    <eval expected="-1826" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 1ff5ca2f1da0e5ab4508f6620f8f53921b517e7f..457b4a8984d06eea2a36a248114b1d54360779a5 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="18500" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[1]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[1]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
+
     <eval expected="18500" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
     <eval expected="2750" xpath="//flow/block[2]/lineArea[1]/@space-before"/>
     <eval expected="2750" xpath="//flow/block[2]/lineArea[1]/@space-after"/>
     <eval expected="7180" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
 
+    <eval expected="18500" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[3]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[3]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="18500" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[4]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[4]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
+
     <eval expected="18500" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
     <eval expected="2750" xpath="//flow/block[5]/lineArea[1]/@space-before"/>
     <eval expected="2750" xpath="//flow/block[5]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="7180" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="4565" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="18500" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
+    <eval expected="18500" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[6]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[6]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="9250" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="18500" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[7]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[7]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="9250" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="21780" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
     <eval expected="2750" xpath="//flow/block[8]/lineArea[1]/@space-before"/>
     <eval expected="2750" xpath="//flow/block[8]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="3280" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+    <eval expected="3280" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="19045" xpath="//flow/block[9]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[9]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[9]/lineArea[1]/@space-after"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="9795" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[2]/@offset"/>
+
+    <eval expected="28960" xpath="//flow/block[10]/lineArea[1]/@bpd"/>
+    <eval expected="2750" xpath="//flow/block[10]/lineArea[1]/@space-before"/>
+    <eval expected="2750" xpath="//flow/block[10]/lineArea[1]/@space-after"/>
+    <eval expected="10460" xpath="//flow/block[10]/lineArea[1]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="10460" xpath="//flow/block[10]/lineArea[1]/text[2]/@offset"/>
 
-    <eval expected="18500" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
+    <eval expected="23730" xpath="//flow/block[11]/lineArea[1]/@bpd"/>
     <eval expected="2750" xpath="//flow/block[11]/lineArea[1]/@space-before"/>
     <eval expected="2750" xpath="//flow/block[11]/lineArea[1]/@space-after"/>
     <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
+    <eval expected="5230" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="18500" xpath="//flow/block[14]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[14]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[14]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="4565" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="18500" xpath="//flow/block[17]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[17]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[17]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="9250" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="18500" xpath="//flow/block[20]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[20]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[20]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="9250" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="21780" xpath="//flow/block[23]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[23]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[23]/lineArea[1]/@space-after"/>
-    <eval expected="3280" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="3280" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="19045" xpath="//flow/block[26]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[26]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[26]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="9795" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="28960" xpath="//flow/block[29]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[29]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[29]/lineArea[1]/@space-after"/>
-    <eval expected="10460" xpath="//flow/block[29]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="10460" xpath="//flow/block[29]/lineArea[1]/text[2]/@offset"/>
-
-    <eval expected="23730" xpath="//flow/block[32]/lineArea[1]/@bpd"/>
-    <eval expected="2750" xpath="//flow/block[32]/lineArea[1]/@space-before"/>
-    <eval expected="2750" xpath="//flow/block[32]/lineArea[1]/@space-after"/>
-    <eval expected="0" xpath="//flow/block[32]/lineArea[1]/text[1]/@offset"/>
-    <eval expected="5230" xpath="//flow/block[32]/lineArea[1]/inlineparent/@offset"/>
-    <eval expected="0" xpath="//flow/block[32]/lineArea[1]/text[2]/@offset"/>
   </checks>
 </testcase>
index 53749b355181ac844dc5904ce2cc81c30beb6547..64d401957d42cdddd66864ca931cc3dafb8f3230 100755 (executable)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[1]/@offset"/>
+    <eval expected="48812" xpath="//flow/block[1]/lineArea[2]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/viewport[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/viewport[2]/@offset"/>
+    <eval expected="48812" xpath="//flow/block[1]/lineArea[2]/text[2]/@offset"/>
+    <eval expected="35995" xpath="//flow/block[1]/lineArea[2]/viewport[3]/@offset"/>
+    <eval expected="17998" xpath="//flow/block[1]/lineArea[2]/viewport[4]/@offset"/>
+    <eval expected="48812" xpath="//flow/block[1]/lineArea[2]/text[3]/@offset"/>
+    <eval expected="34379" xpath="//flow/block[1]/lineArea[2]/viewport[5]/@offset"/>
+    <eval expected="48812" xpath="//flow/block[1]/lineArea[2]/text[4]/@offset"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea[2]/viewport[6]/@offset"/>
+    <eval expected="48812" xpath="//flow/block[1]/lineArea[2]/text[5]/@offset"/>
+
+    <eval expected="14433" xpath="//flow/block[2]/lineArea[2]/text[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[2]/@offset"/>
-    <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[2]/@offset"/>
+    <eval expected="14433" xpath="//flow/block[2]/lineArea[2]/text[2]/@offset"/>
     <eval expected="35995" xpath="//flow/block[2]/lineArea[2]/viewport[3]/@offset"/>
     <eval expected="17998" xpath="//flow/block[2]/lineArea[2]/viewport[4]/@offset"/>
-    <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[3]/@offset"/>
-    <eval expected="34379" xpath="//flow/block[2]/lineArea[2]/viewport[5]/@offset"/>
-    <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[4]/@offset"/>
-    <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[6]/@offset"/>
-    <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[5]/@offset"/>
+    <eval expected="14433" xpath="//flow/block[2]/lineArea[2]/text[3]/@offset"/>
+    <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[5]/@offset"/>
+    <eval expected="14433" xpath="//flow/block[2]/lineArea[2]/text[4]/@offset"/>
+
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/viewport[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/viewport[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/text[2]/@offset"/>
+    <eval expected="35995" xpath="//flow/block[3]/lineArea[2]/viewport[3]/@offset"/>
+    <eval expected="17998" xpath="//flow/block[3]/lineArea[2]/viewport[4]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea[2]/text[3]/@offset"/>
+
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/text[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/viewport[1]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/viewport[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/text[2]/@offset"/>
+    <eval expected="35995" xpath="//flow/block[4]/lineArea[2]/viewport[3]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/viewport[4]/@offset"/>
+    <eval expected="0" xpath="//flow/block[4]/lineArea[2]/text[3]/@offset"/>
 
     <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[1]/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[2]/@offset"/>
     <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[2]/@offset"/>
     <eval expected="35995" xpath="//flow/block[5]/lineArea[2]/viewport[3]/@offset"/>
-    <eval expected="17998" xpath="//flow/block[5]/lineArea[2]/viewport[4]/@offset"/>
+    <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[4]/@offset"/>
     <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[3]/@offset"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[5]/@offset"/>
     <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[4]/@offset"/>
-
-    <eval expected="0" xpath="//flow/block[8]/lineArea[2]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[2]/viewport[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[2]/viewport[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[2]/text[2]/@offset"/>
-    <eval expected="35995" xpath="//flow/block[8]/lineArea[2]/viewport[3]/@offset"/>
-    <eval expected="17998" xpath="//flow/block[8]/lineArea[2]/viewport[4]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea[2]/text[3]/@offset"/>
-
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/viewport[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/viewport[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/text[2]/@offset"/>
-    <eval expected="35995" xpath="//flow/block[11]/lineArea[2]/viewport[3]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/viewport[4]/@offset"/>
-    <eval expected="0" xpath="//flow/block[11]/lineArea[2]/text[3]/@offset"/>
-
-    <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[1]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[2]/@offset"/>
-    <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[2]/@offset"/>
-    <eval expected="35995" xpath="//flow/block[14]/lineArea[2]/viewport[3]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[4]/@offset"/>
-    <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[3]/@offset"/>
-    <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[5]/@offset"/>
-    <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[4]/@offset"/>
   </checks>
 </testcase>
index 6c0c99a75ba2868a992ffc6e2072d5f170158cf3..aa89bcbfa24126431c9746ec97ee16d0cf46c0b6 100755 (executable)
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-end"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-start"/>
 
+    <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[6]/lineArea/@ipd"/>
+    <eval expected="16000" xpath="//flow/block[6]/lineArea/inlineparent/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[6]/lineArea/inlineparent/@ipda"/>
+    <eval expected="5280" xpath="//flow/block[6]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[6]/lineArea/inlineparent/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea/inlineparent/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea/inlineparent/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea/inlineparent/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[6]/lineArea/inlineparent/@padding-start"/>
+
     <eval expected="11100" xpath="//flow/block[7]/lineArea/@bpd"/>
     <eval expected="360000" xpath="//flow/block[7]/lineArea/@ipd"/>
-    <eval expected="16000" xpath="//flow/block[7]/lineArea/inlineparent/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[7]/lineArea/inlineparent/@ipda"/>
-    <eval expected="5280" xpath="//flow/block[7]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-start"/>
+    <eval expected="16000" xpath="//flow/block[7]/lineArea/leader/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[7]/lineArea/leader/@ipda"/>
+    <eval expected="7616" xpath="//flow/block[7]/lineArea/leader/@offset"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/leader/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/leader/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/leader/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/leader/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea/leader/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea/leader/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea/leader/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[7]/lineArea/leader/@padding-start"/>
+
+    <eval expected="11100" xpath="//flow/block[8]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[8]/lineArea/@ipd"/>
+    <eval expected="16000" xpath="//flow/block[8]/lineArea/leader/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[8]/lineArea/leader/@ipda"/>
+    <eval expected="7616" xpath="//flow/block[8]/lineArea/leader/@offset"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[8]/lineArea/leader/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[8]/lineArea/leader/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[8]/lineArea/leader/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[8]/lineArea/leader/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea/leader/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea/leader/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea/leader/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[8]/lineArea/leader/@padding-start"/>
+
+    <eval expected="11100" xpath="//flow/block[9]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[9]/lineArea/@ipd"/>
+    <eval expected="16000" xpath="//flow/block[9]/lineArea/space/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[9]/lineArea/space/@ipda"/>
+    <eval expected="8615" xpath="//flow/block[9]/lineArea/space/@offset"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[9]/lineArea/space/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[9]/lineArea/space/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[9]/lineArea/space/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[9]/lineArea/space/@padding-start"/>
+
+    <eval expected="11100" xpath="//flow/block[11]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[11]/lineArea/@ipd"/>
+    <eval expected="24000" xpath="//flow/block[11]/lineArea/inlineparent/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[11]/lineArea/inlineparent/@ipda"/>
+    <eval expected="5280" xpath="//flow/block[11]/lineArea/inlineparent/@offset"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-start"/>
 
-    <eval expected="11100" xpath="//flow/block[10]/lineArea/@bpd"/>
-    <eval expected="360000" xpath="//flow/block[10]/lineArea/@ipd"/>
-    <eval expected="16000" xpath="//flow/block[10]/lineArea/leader/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[10]/lineArea/leader/@ipda"/>
-    <eval expected="7616" xpath="//flow/block[10]/lineArea/leader/@offset"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-start"/>
+    <eval expected="11100" xpath="//flow/block[12]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[12]/lineArea/@ipd"/>
+    <eval expected="24000" xpath="//flow/block[12]/lineArea/leader/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[12]/lineArea/leader/@ipda"/>
+    <eval expected="7616" xpath="//flow/block[12]/lineArea/leader/@offset"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[12]/lineArea/leader/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[12]/lineArea/leader/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[12]/lineArea/leader/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[12]/lineArea/leader/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[12]/lineArea/leader/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[12]/lineArea/leader/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[12]/lineArea/leader/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[12]/lineArea/leader/@padding-start"/>
 
     <eval expected="11100" xpath="//flow/block[13]/lineArea/@bpd"/>
     <eval expected="360000" xpath="//flow/block[13]/lineArea/@ipd"/>
-    <eval expected="16000" xpath="//flow/block[13]/lineArea/leader/@ipd"/>
+    <eval expected="24000" xpath="//flow/block[13]/lineArea/leader/@ipd"/>
     <eval expected="36000" xpath="//flow/block[13]/lineArea/leader/@ipda"/>
     <eval expected="7616" xpath="//flow/block[13]/lineArea/leader/@offset"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-start"/>
-
-    <eval expected="11100" xpath="//flow/block[16]/lineArea/@bpd"/>
-    <eval expected="360000" xpath="//flow/block[16]/lineArea/@ipd"/>
-    <eval expected="16000" xpath="//flow/block[16]/lineArea/space/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[16]/lineArea/space/@ipda"/>
-    <eval expected="8615" xpath="//flow/block[16]/lineArea/space/@offset"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-start"/>
-
-    <eval expected="11100" xpath="//flow/block[22]/lineArea/@bpd"/>
-    <eval expected="360000" xpath="//flow/block[22]/lineArea/@ipd"/>
-    <eval expected="24000" xpath="//flow/block[22]/lineArea/inlineparent/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[22]/lineArea/inlineparent/@ipda"/>
-    <eval expected="5280" xpath="//flow/block[22]/lineArea/inlineparent/@offset"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-start"/>
-
-    <eval expected="11100" xpath="//flow/block[25]/lineArea/@bpd"/>
-    <eval expected="360000" xpath="//flow/block[25]/lineArea/@ipd"/>
-    <eval expected="24000" xpath="//flow/block[25]/lineArea/leader/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[25]/lineArea/leader/@ipda"/>
-    <eval expected="7616" xpath="//flow/block[25]/lineArea/leader/@offset"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[25]/lineArea/leader/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[25]/lineArea/leader/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[25]/lineArea/leader/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[25]/lineArea/leader/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[25]/lineArea/leader/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[25]/lineArea/leader/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[25]/lineArea/leader/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[25]/lineArea/leader/@padding-start"/>
-
-    <eval expected="11100" xpath="//flow/block[28]/lineArea/@bpd"/>
-    <eval expected="360000" xpath="//flow/block[28]/lineArea/@ipd"/>
-    <eval expected="24000" xpath="//flow/block[28]/lineArea/leader/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[28]/lineArea/leader/@ipda"/>
-    <eval expected="7616" xpath="//flow/block[28]/lineArea/leader/@offset"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[28]/lineArea/leader/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[28]/lineArea/leader/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[28]/lineArea/leader/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[28]/lineArea/leader/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[28]/lineArea/leader/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[28]/lineArea/leader/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[28]/lineArea/leader/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[28]/lineArea/leader/@padding-start"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[13]/lineArea/leader/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[13]/lineArea/leader/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[13]/lineArea/leader/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[13]/lineArea/leader/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[13]/lineArea/leader/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[13]/lineArea/leader/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[13]/lineArea/leader/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[13]/lineArea/leader/@padding-start"/>
 
-    <eval expected="11100" xpath="//flow/block[31]/lineArea/@bpd"/>
-    <eval expected="360000" xpath="//flow/block[31]/lineArea/@ipd"/>
-    <eval expected="24000" xpath="//flow/block[31]/lineArea/space/@ipd"/>
-    <eval expected="36000" xpath="//flow/block[31]/lineArea/space/@ipda"/>
-    <eval expected="8615" xpath="//flow/block[31]/lineArea/space/@offset"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[31]/lineArea/space/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[31]/lineArea/space/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[31]/lineArea/space/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[31]/lineArea/space/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[31]/lineArea/space/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[31]/lineArea/space/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[31]/lineArea/space/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[31]/lineArea/space/@padding-start"/>
+    <eval expected="11100" xpath="//flow/block[14]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[14]/lineArea/@ipd"/>
+    <eval expected="24000" xpath="//flow/block[14]/lineArea/space/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[14]/lineArea/space/@ipda"/>
+    <eval expected="8615" xpath="//flow/block[14]/lineArea/space/@offset"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[14]/lineArea/space/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea/space/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[14]/lineArea/space/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[14]/lineArea/space/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[14]/lineArea/space/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[14]/lineArea/space/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[14]/lineArea/space/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[14]/lineArea/space/@padding-start"/>
   </checks>
 </testcase>
index 88bd983b1a5a8d2f1a5a260dabcfae3196553c0c..c26d2a2bc342130271f16ecad4d6026c67d12d1d 100644 (file)
     <eval expected="360000" xpath="//flow/@ipd"/>
     
     <!-- spacer block for space-before on list-block -->
-    <eval expected="5000" xpath="//flow/block[2]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[2]/@space-before"/>
     
     <!-- list-block -->
-    <eval expected="360000" xpath="//flow/block[3]/@ipda"/>
-    <eval expected="340000" xpath="//flow/block[3]/@ipd"/>
-    <!--eval expected="??" xpath="//flow/block[3]/@bpda"/>
-    <eval expected="??" xpath="//flow/block[3]/@bpd"/-->
-    <eval expected="10000 10000 10000 10000" xpath="//flow/block[3]/@bap"/>
-    <eval expected="5000" xpath="//flow/block[3]/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[3]/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[3]/@padding-start"/>
-    <eval expected="5000" xpath="//flow/block[3]/@padding-end"/>
-    <eval expected="10000" xpath="//flow/block[3]/@start-indent"/>
-    <eval expected="10000" xpath="//flow/block[3]/@end-indent"/>
+    <eval expected="360000" xpath="//flow/block[2]/@ipda"/>
+    <eval expected="340000" xpath="//flow/block[2]/@ipd"/>
+    <!--eval expected="??" xpath="//flow/block[2]/@bpda"/>
+    <eval expected="??" xpath="//flow/block[2]/@bpd"/-->
+    <eval expected="10000 10000 10000 10000" xpath="//flow/block[2]/@bap"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/@padding-end"/>
+    <eval expected="10000" xpath="//flow/block[2]/@start-indent"/>
+    <eval expected="10000" xpath="//flow/block[2]/@end-indent"/>
     
     <!-- first list-item -->
-    <eval expected="340000" xpath="//flow/block[3]/block[1]/@ipda"/>
-    <eval expected="340000" xpath="//flow/block[3]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/@bpd"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[1]/@start-indent"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[1]/@end-indent"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[1]/@ipda"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/@bpd"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[1]/@start-indent"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[1]/@end-indent"/>
 
-    <eval expected="340000" xpath="//flow/block[3]/block[1]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[1]/@bpd"/>
-    <eval expected="40000" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@ipda"/>
-    <eval expected="40000" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@bpda"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@start-indent"/>
-    <eval expected="310000" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@end-indent"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@space-start"/>
-    <eval expected="310000" xpath="//flow/block[3]/block[1]/block[1]/block[1]/@space-end"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[1]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/block[1]/@bpd"/>
+    <eval expected="40000" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@ipda"/>
+    <eval expected="40000" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@bpda"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@start-indent"/>
+    <eval expected="310000" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@end-indent"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@space-start"/>
+    <eval expected="310000" xpath="//flow/block[2]/block[1]/block[1]/block[1]/@space-end"/>
     
-    <eval expected="340000" xpath="//flow/block[3]/block[1]/block[2]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[2]/@bpd"/>
-    <eval expected="290000" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@ipda"/>
-    <eval expected="280000" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@bpda"/>
-    <eval expected="65000" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@start-indent"/>
-    <eval expected="15000" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@end-indent"/>
-    <eval expected="60000" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@space-start"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[1]/block[2]/block[1]/@space-end"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[1]/block[2]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/block[2]/@bpd"/>
+    <eval expected="290000" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@ipda"/>
+    <eval expected="280000" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@bpda"/>
+    <eval expected="65000" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@start-indent"/>
+    <eval expected="15000" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@end-indent"/>
+    <eval expected="60000" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@space-start"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[1]/block[2]/block[1]/@space-end"/>
     
     <!-- spacer block for space-before on second list-item -->
-    <eval expected="5000" xpath="//flow/block[3]/block[2]/@bpd"/>
+    <eval expected="5000" xpath="//flow/block[2]/block[2]/@space-before"/>
 
     <!-- second list-item -->
-    <eval expected="340000" xpath="//flow/block[3]/block[3]/@ipda"/>
-    <eval expected="340000" xpath="//flow/block[3]/block[3]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/@bpd"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[3]/@start-indent"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[3]/@end-indent"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[2]/@ipda"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[2]/@ipd"/>
+    <eval expected="29400" xpath="//flow/block[2]/block[2]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/@bpd"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[2]/@start-indent"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[2]/@end-indent"/>
 
-    <eval expected="340000" xpath="//flow/block[3]/block[3]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/block[1]/@bpd"/>
-    <eval expected="40000" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@ipda"/>
-    <eval expected="40000" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@bpda"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@start-indent"/>
-    <eval expected="310000" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@end-indent"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@space-start"/>
-    <eval expected="310000" xpath="//flow/block[3]/block[3]/block[1]/block[1]/@space-end"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[2]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/block[1]/@bpd"/>
+    <eval expected="40000" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@ipda"/>
+    <eval expected="40000" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@bpda"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@start-indent"/>
+    <eval expected="310000" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@end-indent"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@space-start"/>
+    <eval expected="310000" xpath="//flow/block[2]/block[2]/block[1]/block[1]/@space-end"/>
     
-    <eval expected="340000" xpath="//flow/block[3]/block[3]/block[2]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/block[2]/@bpd"/>
-    <eval expected="295000" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@ipda"/>
-    <eval expected="285000" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@bpda"/>
-    <eval expected="60000" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@start-indent"/>
-    <eval expected="15000" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@end-indent"/>
-    <eval expected="55000" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@space-start"/>
-    <eval expected="10000" xpath="//flow/block[3]/block[3]/block[2]/block[1]/@space-end"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[2]/block[2]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/block[2]/@bpd"/>
+    <eval expected="295000" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@ipda"/>
+    <eval expected="285000" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@bpda"/>
+    <eval expected="60000" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@start-indent"/>
+    <eval expected="15000" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@end-indent"/>
+    <eval expected="55000" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@space-start"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[2]/block[2]/block[1]/@space-end"/>
 
     <!-- spacer block for space-after on second list-item -->
-    <eval expected="10000" xpath="//flow/block[3]/block[4]/@bpd"/>
+    <eval expected="10000" xpath="//flow/block[2]/block[2]/@space-after"/>
 
     <!-- third list-item -->
-    <eval expected="340000" xpath="//flow/block[3]/block[5]/@ipda"/>
-    <eval expected="320000" xpath="//flow/block[3]/block[5]/@ipd"/>
-    <eval expected="34400" xpath="//flow/block[3]/block[5]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/@bpd"/>
-    <eval expected="10000 10000 10000 10000" xpath="//flow/block[3]/block[5]/@bap"/>
-    <eval expected="5000" xpath="//flow/block[3]/block[5]/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[3]/block[5]/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[3]/block[5]/@padding-start"/>
-    <eval expected="5000" xpath="//flow/block[3]/block[5]/@padding-end"/>
-    <eval expected="20000" xpath="//flow/block[3]/block[5]/@start-indent"/>
-    <eval expected="20000" xpath="//flow/block[3]/block[5]/@end-indent"/>
+    <eval expected="340000" xpath="//flow/block[2]/block[3]/@ipda"/>
+    <eval expected="320000" xpath="//flow/block[2]/block[3]/@ipd"/>
+    <eval expected="34400" xpath="//flow/block[2]/block[3]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/@bpd"/>
+    <eval expected="10000 10000 10000 10000" xpath="//flow/block[2]/block[3]/@bap"/>
+    <eval expected="5000" xpath="//flow/block[2]/block[3]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/block[3]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/block[3]/@padding-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/block[3]/@padding-end"/>
+    <eval expected="20000" xpath="//flow/block[2]/block[3]/@start-indent"/>
+    <eval expected="20000" xpath="//flow/block[2]/block[3]/@end-indent"/>
 
-    <eval expected="320000" xpath="//flow/block[3]/block[5]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/block[1]/@bpd"/>
-    <eval expected="40000" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@ipda"/>
-    <eval expected="40000" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@bpda"/>
-    <eval expected="20000" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@start-indent"/>
-    <eval expected="300000" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@end-indent"/>
-    <eval expected="20000" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@space-start"/>
-    <eval expected="300000" xpath="//flow/block[3]/block[5]/block[1]/block[1]/@space-end"/>
+    <eval expected="320000" xpath="//flow/block[2]/block[3]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/block[1]/@bpd"/>
+    <eval expected="40000" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@ipda"/>
+    <eval expected="40000" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@bpda"/>
+    <eval expected="20000" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@start-indent"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@end-indent"/>
+    <eval expected="20000" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@space-start"/>
+    <eval expected="300000" xpath="//flow/block[2]/block[3]/block[1]/block[1]/@space-end"/>
     
-    <eval expected="320000" xpath="//flow/block[3]/block[5]/block[2]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/block[2]/@bpd"/>
-    <eval expected="280000" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@ipda"/>
-    <eval expected="270000" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@bpda"/>
-    <eval expected="14400" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@bpda"/>
-    <eval expected="70000" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@start-indent"/>
-    <eval expected="20000" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@end-indent"/>
-    <eval expected="65000" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@space-start"/>
-    <eval expected="15000" xpath="//flow/block[3]/block[5]/block[2]/block[1]/@space-end"/>
+    <eval expected="320000" xpath="//flow/block[2]/block[3]/block[2]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/block[2]/@bpd"/>
+    <eval expected="280000" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@ipda"/>
+    <eval expected="270000" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@bpda"/>
+    <eval expected="14400" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@bpda"/>
+    <eval expected="70000" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@start-indent"/>
+    <eval expected="20000" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@end-indent"/>
+    <eval expected="65000" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@space-start"/>
+    <eval expected="15000" xpath="//flow/block[2]/block[3]/block[2]/block[1]/@space-end"/>
 
     <!-- spacer block for space-after on list-block -->
-    <eval expected="10000" xpath="//flow/block[4]/@bpd"/>
+    <eval expected="10000" xpath="//flow/block[2]/@space-after"/>
     
   </checks>
 </testcase>
diff --git a/test/layoutengine/testcases/list-block_space-before_space-after_1.xml b/test/layoutengine/testcases/list-block_space-before_space-after_1.xml
new file mode 100644 (file)
index 0000000..7c5aeda
--- /dev/null
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 lists. Checks for the presence of space-before and space-after on list-items.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="1.7in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" id="retain">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:list-block provisional-distance-between-starts="8pt" provisional-label-separation="5pt" 
+              space-before="20pt" space-before.conditionality="retain" 
+              space-after="10pt" space-after.conditionality="retain">
+            <fo:list-item space-before="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block text-align="justify">
+In olden times when wishing still helped one, there lived a king whose daughters 
+were all beautiful; and the youngest was so beautiful that the sun itself, which 
+has seen so much, was astonished whenever it shone in her face. Close by the king's 
+castle lay a great dark forest, and under an old lime-tree in the forest was a well, 
+and when the day was very warm, the king's child went out into the forest and sat 
+down by the side of the cool fountain; and when she was bored she took a golden ball, 
+and threw it up on high and caught it; and this ball was her favorite plaything.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item>
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </fo:list-block>
+          <fo:block space-before.optimum="10pt" space-before.conditionality="retain" space-after.optimum="20pt" space-after.conditionality="retain">
+Two blocks, testing conditionality="retain".
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+      <fo:page-sequence master-reference="normal" id="discard">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:list-block provisional-distance-between-starts="8pt" provisional-label-separation="5pt" 
+              space-before="20pt" space-before.conditionality="discard" 
+              space-after="10pt" space-after.conditionality="discard">
+            <fo:list-item space-before="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block text-align="justify">
+In olden times when wishing still helped one, there lived a king whose daughters 
+were all beautiful; and the youngest was so beautiful that the sun itself, which 
+has seen so much, was astonished whenever it shone in her face. Close by the king's 
+castle lay a great dark forest, and under an old lime-tree in the forest was a well, 
+and when the day was very warm, the king's child went out into the forest and sat 
+down by the side of the cool fountain; and when she was bored she took a golden ball, 
+and threw it up on high and caught it; and this ball was her favorite plaything.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item>
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </fo:list-block>
+          <fo:block space-before.optimum="10pt" space-before.conditionality="discard" space-after.optimum="20pt" space-after.conditionality="discard">
+Two blocks, testing conditionality="discard".
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="breaker" id="retain">
+      <box w="0"/> <!-- Helper box bearing the SpaceHandlingPosition and making sure the glue gets processed -->
+      <penalty w="0" p="INF"/>
+      <glue w="20000"/>
+      
+      <box w="28800"/>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000"/>
+      
+      <box w="14400"/>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000"/>
+      
+      <box w="14400"/>
+      
+      <!-- skip three more lines -->
+      <skip>8</skip>
+      <skip>8</skip>
+      <skip>8</skip>
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000"/>
+      
+      <box w="28800"/> <!-- end of first list item -->
+      
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-30000"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000"/>
+      
+      <box w="14400"/> <!-- second list-item -->
+      
+      <penalty w="0" p="INF" aux="true"/>
+      <glue w="10000"/>
+      <penalty w="0" p="0"/>
+      <glue w="-10000"/>
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="10000"/>
+      
+      <box w="14400"/> <!-- second block -->
+      
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="20000"/>
+      
+      <box w="0"/> <!-- This is used to make sure the preceding glue is not cut off -->
+      
+      <skip>3</skip>
+    </element-list>
+    <element-list category="breaker" id="discard">
+      <box w="0"/> <!-- Helper box used to notify the LM for the addAreas stage about the discarded spaces -->
+      <box w="28800"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <box w="28800"/>
+      <penalty w="0" p="0"/>
+      <box w="14400"/>
+      <penalty w="0" p="0"/>
+      <glue w="10000"/>
+      
+      <box w="14400"/> <!-- second block -->
+      
+      <box w="0"/> <!-- SpaceHandlingPosition-bearing helper box -->
+      
+      <box w="0"/> <!-- This is used to make sure the preceding glue is not cut off -->
+      
+      <skip>3</skip>
+    </element-list>
+
+    <eval expected="4" xpath="count(//pageViewport)"/>
+    
+    <!-- 1: retain -->
+    <eval expected="20000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <eval expected="10000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after"/>
+    <eval expected="20000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/>
+    <!-- the following space is eliminated/collapsed through space resolution -->
+    <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after))"/>
+    <eval expected="10000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-before"/>
+    <eval expected="20000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-after"/>
+    
+    <!-- 2: discard -->
+    <true xpath="not(boolean(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//pageViewport[@nr=4]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//pageViewport[@nr=4]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after))"/>
+    <eval expected="10000" xpath="//pageViewport[@nr=4]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-before"/>
+    <true xpath="not(boolean(//pageViewport[@nr=4]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-after))"/>
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/list-block_space-before_space-after_2.xml b/test/layoutengine/testcases/list-block_space-before_space-after_2.xml
new file mode 100644 (file)
index 0000000..293faeb
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 lists. Checks space-before and space-after on list-block.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="2in" 
+              margin="20pt">
+          <fo:region-body background-color="yellow"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block>test</fo:block>
+          <fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
+            <fo:list-item space-before="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item space-before="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item space-before="1em" space-after="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item space-after="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item>
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </fo:list-block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="2" xpath="count(//pageViewport)"/>
+    <element-list category="breaker">
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000"/>
+      <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000"/>
+      <box w="14400"/>
+      
+      <skip>3</skip>
+    </element-list>
+  </checks>
+</testcase>
index 31aea6eccc404cb3e6abd84afd858c6e45f6d7f1..6e55cf0083dc70db33158467388c0a7af9600a44 100644 (file)
     <eval expected="2" xpath="count(//pageViewport)"/>
     <element-list category="breaker">
       <box w="14400"/>
+      
       <penalty w="0" p="0"/>
+      
       <glue w="12000"/>
       <box w="14400"/>
+      
       <penalty w="0" p="0"/>
+      
       <glue w="12000"/>
       <box w="14400"/>
+      
       <penalty w="0" p="0"/>
+      
       <glue w="12000"/>
       <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
       <glue w="12000"/>
       <box w="14400"/>
+      
+      <penalty w="0" p="0"/>
+      
       <glue w="12000"/>
       <box w="14400"/>
+      
       <skip>3</skip>
     </element-list>
   </checks>
index 855046352ac31b6dbcb01266d3803d694f8f215e..15e50132443258c3316dcba4c496f0ac1c63f6b7 100644 (file)
       instead of optimum and the addAreas stage doesn't create smaller space-before/after 
       spacers. -->
     
+    <!-- We don't check the exact effective space-before value, but simply make sure it's smaller than 12pt=1em in this test case -->
+    <true xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@space-before &lt; 12000"/>
+    
     <element-list category="breaker">
       <box w="14400"/>
+      
       <penalty w="0" p="0"/>
-      <glue w="12000"/> <!-- TODO Check shrink/stretch -->
+      
+      <glue w="12000" y="0" z="12000"/>
       <box w="14400"/>
+      
       <penalty w="0" p="0"/>
-      <glue w="12000"/>
+      
+      <glue w="12000"  y="0" z="12000"/>
       <box w="14400"/>
+      
       <penalty w="0" p="0"/>
-      <glue w="12000"/>
+      
+      <glue w="12000" y="0" z="12000"/>
       <box w="14400"/>
-      <glue w="12000"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000" y="0" z="12000"/>
       <box w="14400"/>
-      <glue w="12000"/>
+      
+      <penalty w="0" p="0"/>
+      
+      <glue w="12000" y="0" z="12000"/>
       <box w="14400"/>
+      
       <skip>3</skip>
     </element-list>
   </checks>
diff --git a/test/layoutengine/testcases/list-item_space-before_space-after_3.xml b/test/layoutengine/testcases/list-item_space-before_space-after_3.xml
new file mode 100644 (file)
index 0000000..6b8a81a
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed 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 lists. Checks spaces inside list-item content.
+    </p>
+    <p>
+      Some additional code is notify the LMs about the effective spaces, otherwise discardable spaces don't get discarded.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="2in" 
+              margin="20pt">
+          <fo:region-body background-color="yellow"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
+            <fo:list-item space-before="1em">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block space-before="1em">•</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block space-before="1em">here is text in the list item body</fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </fo:list-block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="list-item-label">
+      <box w="0"/> <!-- Starting SpaceHandlingPosition -->
+      <box w="14400"/>
+    </element-list>
+    <element-list category="list-item-body">
+      <box w="0"/> <!-- Starting SpaceHandlingPosition -->
+      <box w="14400"/>
+    </element-list>
+    <element-list category="breaker">
+      <box w="0"/> <!-- Starting SpaceHandlingPosition -->
+      <box w="14400"/>
+      
+      <skip>3</skip>
+    </element-list>
+    <true xpath="not(boolean(//flow/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/block[1]/block[1]/@space-before))"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/block[2]/@space-before))"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/block[2]/block[1]/@space-before))"/>
+  </checks>
+</testcase>
index 3fa18cd286b6ec9982c570482b8f0e6115a3eec5..cc1797f8451e95fa12d9e0228f79b512f6f68e64 100644 (file)
       </fo:layout-master-set>
       <fo:page-sequence master-reference="simple">
         <fo:flow flow-name="xsl-region-body">
-          <fo:block line-height="10pt" space-before.optimum="5cm" 
+          <fo:block-container height="5cm">
+            <fo:block/>
+          </fo:block-container>
+          <fo:block line-height="10pt"
             white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" wrap-option="no-wrap">
 <![CDATA[<!-- list level 1 -->
 <fo:list-block provisional-distance-between-starts="0.4cm"
index 7512c1e94dd6f7adc6dfe489f05d07b76938ab12..ed65a507cd63e7a358cdfc297fb191575afd6700 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea/text[2]/@offset"/>
+    <eval expected="5560" xpath="//flow/block[1]/lineArea/text[2]/@ipd"/>
+    <eval expected="7560" xpath="//flow/block[1]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-start"/>
+
     <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@baseline"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea/text[2]/@offset"/>
     <eval expected="5560" xpath="//flow/block[2]/lineArea/text[2]/@ipd"/>
-    <eval expected="7560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/>
-
-    <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@baseline"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
-    <eval expected="5560" xpath="//flow/block[5]/lineArea/text[2]/@ipd"/>
-    <eval expected="25560" xpath="//flow/block[5]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-start"/>
+    <eval expected="25560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-start"/>
 
-    <eval expected="7180" xpath="//flow/block[8]/lineArea/text[2]/@baseline"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/>
-    <eval expected="5560" xpath="//flow/block[8]/lineArea/text[2]/@ipd"/>
-    <eval expected="17560" xpath="//flow/block[8]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/text[2]/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea/text[2]/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea/text[2]/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[8]/lineArea/text[2]/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[8]/lineArea/text[2]/@padding-start"/>
+    <eval expected="7180" xpath="//flow/block[3]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/text[2]/@offset"/>
+    <eval expected="5560" xpath="//flow/block[3]/lineArea/text[2]/@ipd"/>
+    <eval expected="17560" xpath="//flow/block[3]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[3]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[3]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[3]/lineArea/text[2]/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea/text[2]/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea/text[2]/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea/text[2]/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[3]/lineArea/text[2]/@padding-start"/>
 
-    <eval expected="5744" xpath="//flow/block[11]/lineArea/text[2]/@baseline"/>
-    <eval expected="8616" xpath="//flow/block[11]/lineArea/text[2]/@offset"/>
-    <eval expected="4448" xpath="//flow/block[11]/lineArea/text[2]/@ipd"/>
-    <eval expected="24448" xpath="//flow/block[11]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-start"/>
+    <eval expected="5744" xpath="//flow/block[4]/lineArea/text[2]/@baseline"/>
+    <eval expected="8616" xpath="//flow/block[4]/lineArea/text[2]/@offset"/>
+    <eval expected="4448" xpath="//flow/block[4]/lineArea/text[2]/@ipd"/>
+    <eval expected="24448" xpath="//flow/block[4]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-start"/>
   </checks>
 </testcase>
index be9bbb7070fef25dd0821448b631d5fdde3c716d..b8f5315a14473bd3172230b80a94e2c75417278c 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/text[2]/@offset"/>
     <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@offset"/>
-    <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/>
-    <eval expected="4565" xpath="//flow/block[11]/lineArea/text[2]/@offset"/>
-    <eval expected="9250" xpath="//flow/block[14]/lineArea/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/text[2]/@offset"/>
+    <eval expected="4565" xpath="//flow/block[4]/lineArea/text[2]/@offset"/>
+    <eval expected="9250" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
   </checks>
 </testcase>
index c099d1c1e901eba0d52e910b9c03fc81b3167537..cffa2eda1c2787659b5b78097c3ec2eb5b2c4d5a 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea/text[2]/@offset"/>
+    <eval expected="5560" xpath="//flow/block[1]/lineArea/text[2]/@ipd"/>
+    <eval expected="7560" xpath="//flow/block[1]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-start"/>
+
     <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@baseline"/>
     <eval expected="0" xpath="//flow/block[2]/lineArea/text[2]/@offset"/>
     <eval expected="5560" xpath="//flow/block[2]/lineArea/text[2]/@ipd"/>
-    <eval expected="7560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/>
-
-    <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@baseline"/>
-    <eval expected="0" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
-    <eval expected="5560" xpath="//flow/block[5]/lineArea/text[2]/@ipd"/>
-    <eval expected="25560" xpath="//flow/block[5]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-start"/>
+    <eval expected="25560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-start"/>
 
-    <eval expected="7180" xpath="//flow/block[8]/lineArea/text[2]/@baseline"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/>
-    <eval expected="5560" xpath="//flow/block[8]/lineArea/text[2]/@ipd"/>
-    <eval expected="17560" xpath="//flow/block[8]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/text[2]/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[8]/lineArea/text[2]/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[8]/lineArea/text[2]/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[8]/lineArea/text[2]/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[8]/lineArea/text[2]/@padding-start"/>
+    <eval expected="7180" xpath="//flow/block[3]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/text[2]/@offset"/>
+    <eval expected="5560" xpath="//flow/block[3]/lineArea/text[2]/@ipd"/>
+    <eval expected="17560" xpath="//flow/block[3]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[3]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[3]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[3]/lineArea/text[2]/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea/text[2]/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea/text[2]/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea/text[2]/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[3]/lineArea/text[2]/@padding-start"/>
 
-    <eval expected="5744" xpath="//flow/block[11]/lineArea/text[2]/@baseline"/>
-    <eval expected="8616" xpath="//flow/block[11]/lineArea/text[2]/@offset"/>
-    <eval expected="4448" xpath="//flow/block[11]/lineArea/text[2]/@ipd"/>
-    <eval expected="24448" xpath="//flow/block[11]/lineArea/text[2]/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-start"/>
+    <eval expected="5744" xpath="//flow/block[4]/lineArea/text[2]/@baseline"/>
+    <eval expected="8616" xpath="//flow/block[4]/lineArea/text[2]/@offset"/>
+    <eval expected="4448" xpath="//flow/block[4]/lineArea/text[2]/@ipd"/>
+    <eval expected="24448" xpath="//flow/block[4]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-start"/>
   </checks>
 </testcase>
index f436bbd309fe109a259352d87af898066c8cfa1a..a4605027ab67394d6e28563f2aaabc76453c9d7e 100755 (executable)
     </fo:root>
   </fo>
   <checks>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/text[2]/@offset"/>
     <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@offset"/>
-    <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
-    <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/>
-    <eval expected="4565" xpath="//flow/block[11]/lineArea/text[2]/@offset"/>
-    <eval expected="9250" xpath="//flow/block[14]/lineArea/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/text[2]/@offset"/>
+    <eval expected="4565" xpath="//flow/block[4]/lineArea/text[2]/@offset"/>
+    <eval expected="9250" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
   </checks>
 </testcase>
index d791e965f7586405afe97f993c49e8618eeeca68..18a041c20047eb04fa9f9ceddc4a6b57e3e44cfc 100644 (file)
     <true xpath="//flow/block[1]/block[1]/@is-reference-area"/>
     <eval expected="144000" xpath="//flow/block[1]/block[1]/@ipd"/>
     <eval expected="43200" xpath="//flow/block[1]/block[1]/@bpd"/>
-    <eval expected="115200" xpath="//flow/block[1]/block[1]/block[2]/@ipd"/>
-    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@bpd"/>
-    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@start-indent"/>
-    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@space-start"/>
-    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@end-indent"/>
-    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@space-end"/>
+    <eval expected="115200" xpath="//flow/block[1]/block[1]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@bpd"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@space-before"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@space-after"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@start-indent"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@space-start"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@end-indent"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@space-end"/>
 
     <!-- cell 2 -->
     <true xpath="//flow/block[1]/block[2]/@is-reference-area"/>