You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

table-body_basic_2.xml 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks element-lists on tables, particularly a constellation where a single line
  21. from one column might be printed alone while the rest of the content is broken over to
  22. the next part.
  23. </p>
  24. </info>
  25. <fo>
  26. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  27. <fo:layout-master-set>
  28. <fo:simple-page-master master-name="normal" page-width="4in" page-height="1.4in">
  29. <fo:region-body/>
  30. </fo:simple-page-master>
  31. </fo:layout-master-set>
  32. <fo:page-sequence master-reference="normal" widows="3" orphans="3">
  33. <fo:flow flow-name="xsl-region-body">
  34. <fo:block-container height="9*8400mpt">
  35. <fo:block/>
  36. </fo:block-container>
  37. <fo:table font-size="8pt">
  38. <fo:table-column column-width="10%"/>
  39. <fo:table-column column-width="90%"/>
  40. <fo:table-body>
  41. <fo:table-row>
  42. <fo:table-cell>
  43. <fo:block>A</fo:block>
  44. <fo:block>B</fo:block>
  45. <!-- Note: The second "B" block is there to trigger a problem that was revealed in a earlier attempt at handling this special case. -->
  46. </fo:table-cell>
  47. <fo:table-cell>
  48. <fo:block>Cras et felis faucibus justo fringilla tincidunt. Vivamus vitae wisi ut orci egestas bibendum. Nullam nunc orci, euismod non, pulvinar sit amet, aliquet a, leo. Aliquam dapibus, justo pulvinar euismod fringilla, neque ipsum pretium lorem, eget pharetra eros massa vel nulla. Ut lobortis enim id magna. Pellentesque sagittis. Etiam tristique arcu. Cras eu dolor. Praesent aliquam wisi sit amet enim. Nullam id diam.</fo:block>
  49. </fo:table-cell>
  50. </fo:table-row>
  51. </fo:table-body>
  52. </fo:table>
  53. </fo:flow>
  54. </fo:page-sequence>
  55. </fo:root>
  56. </fo>
  57. <checks>
  58. <!-- Both 'A' and 'B' must be on the second page -->
  59. <eval expected="2" xpath="//text[.='A']/ancestor::pageViewport/@nr"/>
  60. <eval expected="2" xpath="//text[.='B']/ancestor::pageViewport/@nr"/>
  61. <element-list category="breaker">
  62. <box w="75600"/> <!-- block-container as spacer -->
  63. <penalty w="0" p="0"/>
  64. <box w="28800"/>
  65. <penalty w="0" p="0"/>
  66. <box w="28800"/>
  67. <skip>3</skip>
  68. </element-list>
  69. </checks>
  70. </testcase>