is a web/WAP/Palm developer from Laguna Beach, California, USA. A
recent XML/XSL-FO convert, he has been nit-picking FAQs & assorted web
pages since his first webmaster position @brain.com in 1996. Most
- important creation? His li'l Jeremy was born June 18, 2002.</li>
+ important creation? He's got a couple of cool kids.</li>
<li id="mm"><link href="mailto:manuel@apache.org">Manuel Mall</link> (MM)
is an independant software engineer resident in Perth, Australia. Born a long time
ago in Germany he has been involved in Software Engineering (Informatik) since the
BorderSpecification borderSpec = new BorderSpecification(
getCommonBorderPaddingBackground().getBorderInfo(side), getNameId());
switch (side) {
- case CommonBorderPaddingBackground.BEFORE:
- borderBefore = new ConditionalBorder(borderSpec, collapsingBorderModel);
- break;
- case CommonBorderPaddingBackground.AFTER:
- borderAfter = new ConditionalBorder(borderSpec, collapsingBorderModel);
- break;
- case CommonBorderPaddingBackground.START:
- borderStart = borderSpec;
- break;
- case CommonBorderPaddingBackground.END:
- borderEnd = borderSpec;
- break;
- default: assert false;
+ case CommonBorderPaddingBackground.BEFORE:
+ borderBefore = new ConditionalBorder(borderSpec, collapsingBorderModel);
+ break;
+ case CommonBorderPaddingBackground.AFTER:
+ borderAfter = new ConditionalBorder(borderSpec, collapsingBorderModel);
+ break;
+ case CommonBorderPaddingBackground.START:
+ borderStart = borderSpec;
+ break;
+ case CommonBorderPaddingBackground.END:
+ borderEnd = borderSpec;
+ break;
+ default: assert false;
}
}
}
int y = 0;
if (abProps.left.getEnum() != EN_AUTO) {
x = abProps.left.getValue(this);
+ } else if (abProps.right.getEnum() != EN_AUTO
+ && width.getEnum() != EN_AUTO) {
+ x = getReferenceAreaIPD()
+ - abProps.right.getValue(this) - width.getValue(this);
}
if (abProps.top.getEnum() != EN_AUTO) {
y = abProps.top.getValue(this);
+ } else if (abProps.bottom.getEnum() != EN_AUTO
+ && height.getEnum() != EN_AUTO) {
+ y = getReferenceAreaBPD()
+ - abProps.bottom.getValue(this) - height.getValue(this);
}
return new Point(x, y);
}
}
+
gen.useColor(col);
}
- /** {@inheritDoc}
- * Area, float, float, float, float) */
+ /** {@inheritDoc} */
protected void drawBackAndBorders(Area area, float startx, float starty,
float width, float height) {
if (area.hasTrait(Trait.BACKGROUND)
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startRenderer(OutputStream outputStream)
throws IOException {
log.debug("Rendering areas to PostScript...");
gen.writeDSCComment(DSCConstants.END_SETUP);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void stopRenderer() throws IOException {
//Notify resource usage for font which are not supplied
/* done in useFont now
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void renderPage(PageViewport page)
throws IOException, FOPException {
log.debug("renderPage(): " + page);
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void renderText(TextArea area) {
renderInlineAreaBackAndBorders(area);
String fontkey = getInternalFontNameForArea(area);
renderTextDecoration(tf, fontsize, area, bl, rx);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
protected void renderWord(WordArea word) {
renderText((TextArea)word.getParentArea(), word.getWord(), word.getLetterAdjustArray());
super.renderWord(word);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
protected void renderSpace(SpaceArea space) {
AbstractTextArea textArea = (AbstractTextArea)space.getParentArea();
String s = space.getSpace();
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.xml;
+
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.fop.area.BookmarkData;
+import org.apache.fop.area.OffDocumentExtensionAttachment;
+import org.apache.fop.area.OffDocumentItem;
+import org.apache.fop.area.PageViewport;
+import org.apache.fop.fo.extensions.ExtensionAttachment;
+import org.apache.fop.render.PrintRenderer;
+import org.apache.fop.render.RendererContext;
+import org.apache.xmlgraphics.util.QName;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.AttributesImpl;
+
+public abstract class AbstractXMLRenderer extends PrintRenderer {
+ /** Main namespace in use. */
+ public static final String NS = "";
+
+ /** CDATA type */
+ public static final String CDATA = "CDATA";
+
+ /** An empty Attributes object used when no attributes are needed. */
+ public static final Attributes EMPTY_ATTS = new AttributesImpl();
+
+ /** AttributesImpl instance that can be used during XML generation. */
+ protected AttributesImpl atts = new AttributesImpl();
+
+ /** ContentHandler that the generated XML is written to */
+ protected ContentHandler handler;
+
+ /** The OutputStream to write the generated XML to. */
+ protected OutputStream out;
+
+ protected RendererContext context;
+
+ /** A list of ExtensionAttachements received through processOffDocumentItem() */
+ protected List extensionAttachments;
+
+ /**
+ * Handles SAXExceptions.
+ * @param saxe the SAXException to handle
+ */
+ protected void handleSAXException(SAXException saxe) {
+ throw new RuntimeException(saxe.getMessage());
+ }
+
+ /**
+ * Handles page extension attachments
+ * @param page the page viewport
+ */
+ protected void handlePageExtensionAttachments(PageViewport page) {
+ handleExtensionAttachments(page.getExtensionAttachments());
+ }
+
+ /**
+ * Writes a comment to the generated XML.
+ * @param comment the comment
+ */
+ protected void comment(String comment) {
+ if (handler instanceof LexicalHandler) {
+ try {
+ ((LexicalHandler) handler).comment(comment.toCharArray(), 0, comment.length());
+ } catch (SAXException saxe) {
+ handleSAXException(saxe);
+ }
+ }
+ }
+
+ /**
+ * Starts a new element (without attributes).
+ * @param tagName tag name of the element
+ */
+ protected void startElement(String tagName) {
+ startElement(tagName, EMPTY_ATTS);
+ }
+
+ /**
+ * Starts a new element.
+ * @param tagName tag name of the element
+ * @param atts attributes to add
+ */
+ protected void startElement(String tagName, Attributes atts) {
+ try {
+ handler.startElement(NS, tagName, tagName, atts);
+ } catch (SAXException saxe) {
+ handleSAXException(saxe);
+ }
+ }
+
+ /**
+ * Ends an element.
+ * @param tagName tag name of the element
+ */
+ protected void endElement(String tagName) {
+ try {
+ handler.endElement(NS, tagName, tagName);
+ } catch (SAXException saxe) {
+ handleSAXException(saxe);
+ }
+ }
+
+ /**
+ * Sends plain text to the XML
+ * @param text the text
+ */
+ protected void characters(String text) {
+ try {
+ char[] ca = text.toCharArray();
+ handler.characters(ca, 0, ca.length);
+ } catch (SAXException saxe) {
+ handleSAXException(saxe);
+ }
+ }
+
+ /**
+ * Adds a new attribute to the protected member variable "atts".
+ * @param name name of the attribute
+ * @param value value of the attribute
+ */
+ protected void addAttribute(String name, String value) {
+ atts.addAttribute(NS, name, name, CDATA, value);
+ }
+
+ /**
+ * Adds a new attribute to the protected member variable "atts".
+ * @param name name of the attribute
+ * @param value value of the attribute
+ */
+ protected void addAttribute(QName name, String value) {
+ atts.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.getQName(),
+ CDATA, value);
+ }
+
+ /**
+ * Adds a new attribute to the protected member variable "atts".
+ * @param name name of the attribute
+ * @param value value of the attribute
+ */
+ protected void addAttribute(String name, int value) {
+ addAttribute(name, Integer.toString(value));
+ }
+
+ private String createString(Rectangle2D rect) {
+ return "" + (int) rect.getX() + " " + (int) rect.getY() + " "
+ + (int) rect.getWidth() + " " + (int) rect.getHeight();
+ }
+
+ /**
+ * Adds a new attribute to the protected member variable "atts".
+ * @param name name of the attribute
+ * @param rect a Rectangle2D to format and use as attribute value
+ */
+ protected void addAttribute(String name, Rectangle2D rect) {
+ addAttribute(name, createString(rect));
+ }
+
+ /** {@inheritDoc} */
+ public void startRenderer(OutputStream outputStream)
+ throws IOException {
+ if (this.handler == null) {
+ SAXTransformerFactory factory
+ = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+ try {
+ TransformerHandler transformerHandler = factory.newTransformerHandler();
+ setContentHandler(transformerHandler);
+ StreamResult res = new StreamResult(outputStream);
+ transformerHandler.setResult(res);
+ } catch (TransformerConfigurationException tce) {
+ throw new RuntimeException(tce.getMessage());
+ }
+ this.out = outputStream;
+ }
+
+ try {
+ handler.startDocument();
+ } catch (SAXException saxe) {
+ handleSAXException(saxe);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void stopRenderer() throws IOException {
+ try {
+ handler.endDocument();
+ } catch (SAXException saxe) {
+ handleSAXException(saxe);
+ }
+ if (this.out != null) {
+ this.out.flush();
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void processOffDocumentItem(OffDocumentItem oDI) {
+ if (oDI instanceof BookmarkData) {
+ renderBookmarkTree((BookmarkData) oDI);
+ } else if (oDI instanceof OffDocumentExtensionAttachment) {
+ ExtensionAttachment attachment = ((OffDocumentExtensionAttachment)oDI).getAttachment();
+ if (extensionAttachments == null) {
+ extensionAttachments = new java.util.ArrayList();
+ }
+ extensionAttachments.add(attachment);
+ } else {
+ String warn = "Ignoring OffDocumentItem: " + oDI;
+ log.warn(warn);
+ }
+ }
+
+ /** {@inheritDoc} */
+ protected void handleDocumentExtensionAttachments() {
+ if (extensionAttachments != null && extensionAttachments.size() > 0) {
+ handleExtensionAttachments(extensionAttachments);
+ extensionAttachments.clear();
+ }
+ }
+
+ /**
+ * Sets an outside TransformerHandler to use instead of the default one
+ * create in this class in startRenderer().
+ * @param handler Overriding TransformerHandler
+ */
+ public void setContentHandler(ContentHandler handler) {
+ this.handler = handler;
+ }
+
+ /**
+ * Handles a list of extension attachments
+ * @param attachments a list of extension attachments
+ */
+ protected abstract void handleExtensionAttachments(List attachments);
+
+ /**
+ * Renders a bookmark tree
+ * @param odi the bookmark data
+ */
+ protected abstract void renderBookmarkTree(BookmarkData odi);
+}
import org.w3c.dom.Document;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.AttributesImpl;
import org.apache.xmlgraphics.util.QName;
import org.apache.xmlgraphics.util.XMLizable;
* The output can be used to build a new area tree which can be
* rendered to any renderer.
*/
-public class XMLRenderer extends PrintRenderer {
+public class XMLRenderer extends AbstractXMLRenderer {
/** XML MIME type */
public static final String XML_MIME_TYPE = MimeConstants.MIME_FOP_AREA_TREE;
- /** Main namespace in use. */
- public static final String NS = "";
-
- /** CDATA type */
- public static final String CDATA = "CDATA";
-
- /** An empty Attributes object used when no attributes are needed. */
- public static final Attributes EMPTY_ATTS = new AttributesImpl();
-
private boolean startedSequence = false;
- private RendererContext context;
private boolean compactFormat = false;
/** If not null, the XMLRenderer will mimic another renderer by using its font setup. */
protected Renderer mimic;
- /** ContentHandler that the generated XML is written to */
- protected ContentHandler handler;
-
- /** AttributesImpl instance that can be used during XML generation. */
- protected AttributesImpl atts = new AttributesImpl();
-
- /** The OutputStream to write the generated XML to. */
- protected OutputStream out;
-
- /** A list of ExtensionAttachements received through processOffDocumentItem() */
- protected List extensionAttachments;
-
/**
* Creates a new XML renderer.
*/
}
}
- /**
- * Sets an outside TransformerHandler to use instead of the default one
- * create in this class in startRenderer().
- * @param handler Overriding TransformerHandler
- */
- public void setContentHandler(ContentHandler handler) {
- this.handler = handler;
- }
-
public void setCompactFormat(boolean compact) {
this.compactFormat = compact;
}
return !this.compactFormat;
}
- /**
- * Handles SAXExceptions.
- * @param saxe the SAXException to handle
- */
- protected void handleSAXException(SAXException saxe) {
- throw new RuntimeException(saxe.getMessage());
- }
-
- /**
- * Writes a comment to the generated XML.
- * @param comment the comment
- */
- protected void comment(String comment) {
- if (handler instanceof LexicalHandler) {
- try {
- ((LexicalHandler) handler).comment(comment.toCharArray(), 0, comment.length());
- } catch (SAXException saxe) {
- handleSAXException(saxe);
- }
- }
- }
-
- /**
- * Starts a new element (without attributes).
- * @param tagName tag name of the element
- */
- protected void startElement(String tagName) {
- startElement(tagName, EMPTY_ATTS);
- }
-
- /**
- * Starts a new element.
- * @param tagName tag name of the element
- * @param atts attributes to add
- */
- protected void startElement(String tagName, Attributes atts) {
- try {
- handler.startElement(NS, tagName, tagName, atts);
- } catch (SAXException saxe) {
- handleSAXException(saxe);
- }
- }
-
- /**
- * Ends an element.
- * @param tagName tag name of the element
- */
- protected void endElement(String tagName) {
- try {
- handler.endElement(NS, tagName, tagName);
- } catch (SAXException saxe) {
- handleSAXException(saxe);
- }
- }
-
- /**
- * Sends plain text to the XML
- * @param text the text
- */
- protected void characters(String text) {
- try {
- char[] ca = text.toCharArray();
- handler.characters(ca, 0, ca.length);
- } catch (SAXException saxe) {
- handleSAXException(saxe);
- }
- }
-
- /**
- * Adds a new attribute to the protected member variable "atts".
- * @param name name of the attribute
- * @param value value of the attribute
- */
- protected void addAttribute(String name, String value) {
- atts.addAttribute(NS, name, name, CDATA, value);
- }
-
- /**
- * Adds a new attribute to the protected member variable "atts".
- * @param name name of the attribute
- * @param value value of the attribute
- */
- protected void addAttribute(QName name, String value) {
- atts.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.getQName(),
- CDATA, value);
- }
-
- /**
- * Adds a new attribute to the protected member variable "atts".
- * @param name name of the attribute
- * @param value value of the attribute
- */
- protected void addAttribute(String name, int value) {
- addAttribute(name, Integer.toString(value));
- }
-
- /**
- * Adds a new attribute to the protected member variable "atts".
- * @param name name of the attribute
- * @param rect a Rectangle2D to format and use as attribute value
- */
- protected void addAttribute(String name, Rectangle2D rect) {
- addAttribute(name, createString(rect));
- }
-
/**
* Adds the general Area attributes.
* @param area Area to extract attributes from
}
}
- private String createString(Rectangle2D rect) {
- return "" + (int) rect.getX() + " " + (int) rect.getY() + " "
- + (int) rect.getWidth() + " " + (int) rect.getHeight();
- }
-
- private void handleDocumentExtensionAttachments() {
- if (extensionAttachments != null && extensionAttachments.size() > 0) {
- handleExtensionAttachments(extensionAttachments);
- extensionAttachments.clear();
- }
- }
-
/** {@inheritDoc} */
public void processOffDocumentItem(OffDocumentItem oDI) {
if (oDI instanceof BookmarkData) {
startElement("areaTree");
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void stopRenderer() throws IOException {
endPageSequence();
endElement("areaTree");
log.debug("Written out Area Tree XML");
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void renderPage(PageViewport page) throws IOException, FOPException {
atts.clear();
addAttribute("bounds", page.getViewArea());
endElement("pageViewport");
}
- private void handleExtensionAttachments(List attachments) {
+ /** {@inheritDoc} */
+ protected void handleExtensionAttachments(List attachments) {
if (attachments != null && attachments.size() > 0) {
startElement("extension-attachments");
Iterator i = attachments.iterator();
}
}
- private void handlePageExtensionAttachments(PageViewport page) {
- handleExtensionAttachments(page.getExtensionAttachments());
- }
-
/** {@inheritDoc} */
public void startPageSequence(PageSequence pageSequence) {
handleDocumentExtensionAttachments();
<changes>
<release version="FOP Trunk" date="TBD">
+ <action context="Layout" dev="LF" type="fix">
+ Fixed absolute positioning of block-containers when specified
+ using right and bottom instead of left and top.
+ </action>
<action context="Renderers" dev="AC" type="add">
Added PDF encryption parameter support in configuration.
</action>
empty areas in pages whose last normal line contains footnotes
when the page bpd is not the same for all pages.
</action>
+ <action context="Code" dev="AD" type="update" importance="high">
+ Changed FONode.addCharacters() parameter to closer match the signature of
+ the standard SAX characters() event (reduces confusion and computations).
+ <em>!! Implementors of extensions that subclass FONode directly, and
+ offer an implementation for addCharacters() should take care to make
+ similar modifications in their code !!</em>
+ </action>
<!-- change reverted, to be added back later
<action context="Renderers" dev="AC" importance="high" type="add">
Added SVG support for AFP (GOCA).
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks absolutely positioned block-containers using top, bottom, left and right distances
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-width="6in" page-height="5in" margin="0.5in">
+ <fo:region-body margin="0.5in"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="48pt">position</fo:block>
+ <fo:block font-size="48pt" text-align="right"><fo:inline>NOT</fo:inline> ok!</fo:block>
+ <fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="red" top="57pt" left="109pt">
+ <!-- nested container -->
+ <fo:block-container absolute-position="absolute" width="5pt" height="5pt" background-color="white" bottom="20pt" right="41pt">
+ <fo:block></fo:block>
+ </fo:block-container>
+ </fo:block-container>
+ <fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="yellow" top="57pt" right="77pt">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="blue" bottom="99pt" left="109pt">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="green" bottom="99pt" right="77pt">
+ <fo:block/>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- *** first block-container *** -->
+ <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@is-viewport-area"/>
+ <eval expected="absolute" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@positioning"/>
+ <eval expected="109000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@left-position"/>
+ <eval expected="57000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/@top-position"/>
+
+ <!-- *** nested block-container *** -->
+ <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/block[1]/@is-viewport-area"/>
+ <eval expected="absolute" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/block[1]/@positioning"/>
+ <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/block[1]/@left-position"/>
+ <eval expected="5000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[3]/block[1]/block[1]/@top-position"/>
+
+ <!-- *** second block-container *** -->
+ <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@is-viewport-area"/>
+ <eval expected="absolute" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@positioning"/>
+ <eval expected="160000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@left-position"/>
+ <eval expected="57000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[4]/@top-position"/>
+
+ <!-- *** third block-container *** -->
+ <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@is-viewport-area"/>
+ <eval expected="absolute" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@positioning"/>
+ <eval expected="109000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@left-position"/>
+ <eval expected="87000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[5]/@top-position"/>
+
+ <!-- *** fourth block-container *** -->
+ <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@is-viewport-area"/>
+ <eval expected="absolute" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@positioning"/>
+ <eval expected="160000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@left-position"/>
+ <eval expected="87000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[6]/@top-position"/>
+
+ </checks>
+</testcase>