123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <?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 tables, especially headers and footers. Focus is on respect for after
- regions when headers and footers are used.
- </p>
- </info>
- <fo>
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <fo:layout-master-set>
- <fo:simple-page-master master-name="normal" page-width="5in" page-height="3in">
- <fo:region-body margin-top="0.5in" margin-bottom="0.5in"/>
- <fo:region-before extent="0.5in" background-color="lightgray"/>
- <fo:region-after extent="0.5in" background-color="lightgray"/>
- </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:table table-layout="fixed" width="100%">
- <fo:table-column/>
- <fo:table-header color="red">
- <fo:table-row>
- <fo:table-cell id="outer-header">
- <fo:block>Outer header</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-header>
- <fo:table-footer color="red">
- <fo:table-row>
- <fo:table-cell id="outer-footer">
- <fo:block>Outer footer</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-footer>
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell id="outer-table-cell">
- <fo:table table-layout="fixed" width="100%">
- <fo:table-column/>
- <fo:table-header color="orange">
- <fo:table-row>
- <fo:table-cell id="inner-header">
- <fo:block>Inner header</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-header>
- <fo:table-footer color="orange">
- <fo:table-row>
- <fo:table-cell id="inner-footer">
- <fo:block>Inner footer</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-footer>
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>content content content</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <element-list category="breaker">
- <box w="14400"/>
- <penalty w="57600" p="0"/> <!-- outer and inner header/footer = 4 * 14400 = 57600 -->
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="14400"/>
- <penalty w="57600" p="0"/>
- <box w="43200"/> <!-- including nested header/footer -->
- <box w="14400"/> <!--header-->
- <box w="14400"/> <!--footer-->
- <skip>3</skip>
- </element-list>
-
- <!-- top-offset of outer table-cell on first page -->
- <eval expected="14400" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@top-offset"/>
- <!-- last row in nested table on first page -->
- <eval expected="86400" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/block[1]/block[7]/@top-offset"/>
- <!-- top-offset of footer of nested tableon first page -->
- <eval expected="100800" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/block[1]/block[8]/@top-offset"/>
- <!-- top-offset of outer footer on first page -->
- <eval expected="129600" xpath="//pageViewport[@nr=1]//flow/block[1]/block[3]/@top-offset"/>
-
- <!-- content lengths of both pages -->
- <eval expected="144000" xpath="//pageViewport[@nr=1]//flow/@bpd"/>
- <eval expected="129600" xpath="//pageViewport[@nr=2]//flow/@bpd"/>
- </checks>
- </testcase>
|