Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

table_fox_widow-content-limit_1.xml 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 the effect of the proprietary fox:widow-content-limit property.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"
  25. xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="normal" white-space-collapse="true" widows="0" orphans="0">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block space-before="5in - (2 * 1.2em)" space-before.conditionality="retain"/>
  34. <fo:table table-layout="fixed" width="100%" border-collapse="separate"
  35. fox:widow-content-limit="3 * 1.2em">
  36. <fo:table-column column-width="proportional-column-width(1)"/>
  37. <fo:table-column column-width="proportional-column-width(3)"/>
  38. <fo:table-body>
  39. <fo:table-row>
  40. <fo:table-cell>
  41. <fo:block>row 1</fo:block>
  42. </fo:table-cell>
  43. <fo:table-cell>
  44. <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</fo:block>
  45. </fo:table-cell>
  46. </fo:table-row>
  47. <fo:table-row>
  48. <fo:table-cell>
  49. <fo:block>row 2</fo:block>
  50. </fo:table-cell>
  51. <fo:table-cell>
  52. <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec felis ipsum, viverra ut, aliquam porttitor, convallis id, risus. Fusce malesuada nunc nec orci.</fo:block>
  53. </fo:table-cell>
  54. </fo:table-row>
  55. </fo:table-body>
  56. </fo:table>
  57. </fo:flow>
  58. </fo:page-sequence>
  59. <!-- the second page-sequence is without the extension property and just for reference. -->
  60. <fo:page-sequence master-reference="normal" white-space-collapse="true" widows="0" orphans="0">
  61. <fo:flow flow-name="xsl-region-body">
  62. <fo:block space-before="5in - (2 * 1.2em)" space-before.conditionality="retain"/>
  63. <fo:table table-layout="fixed" width="100%" border-collapse="separate">
  64. <fo:table-column column-width="proportional-column-width(1)"/>
  65. <fo:table-column column-width="proportional-column-width(3)"/>
  66. <fo:table-body>
  67. <fo:table-row>
  68. <fo:table-cell>
  69. <fo:block>row 1</fo:block>
  70. </fo:table-cell>
  71. <fo:table-cell>
  72. <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</fo:block>
  73. </fo:table-cell>
  74. </fo:table-row>
  75. <fo:table-row>
  76. <fo:table-cell>
  77. <fo:block>row 2</fo:block>
  78. </fo:table-cell>
  79. <fo:table-cell>
  80. <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec felis ipsum, viverra ut, aliquam porttitor, convallis id, risus. Fusce malesuada nunc nec orci.</fo:block>
  81. </fo:table-cell>
  82. </fo:table-row>
  83. </fo:table-body>
  84. </fo:table>
  85. </fo:flow>
  86. </fo:page-sequence>
  87. </fo:root>
  88. </fo>
  89. <checks>
  90. <element-list category="breaker" index="0">
  91. <box w="0"/>
  92. <penalty w="0" p="INF"/>
  93. <glue w="331200" y="0" z="0"/>
  94. <box w="0"/>
  95. <penalty w="0" p="0"/>
  96. <box w="14400"/>
  97. <penalty w="0" p="INF"/>
  98. <box w="14400"/>
  99. <penalty w="0" p="INF"/>
  100. <box w="14400"/>
  101. <penalty w="0" p="0"/>
  102. <box w="14400"/>
  103. <penalty w="0" p="0"/>
  104. <box w="14400"/>
  105. <penalty w="0" p="0"/>
  106. <box w="14400"/>
  107. <skip>3</skip>
  108. </element-list>
  109. <element-list category="breaker" index="1">
  110. <box w="0"/>
  111. <penalty w="0" p="INF"/>
  112. <glue w="331200" y="0" z="0"/>
  113. <box w="0"/>
  114. <penalty w="0" p="0"/>
  115. <box w="14400"/>
  116. <penalty w="0" p="0"/>
  117. <box w="14400"/>
  118. <penalty w="0" p="0"/>
  119. <box w="14400"/>
  120. <penalty w="0" p="0"/>
  121. <box w="14400"/>
  122. <penalty w="0" p="0"/>
  123. <box w="14400"/>
  124. <penalty w="0" p="0"/>
  125. <box w="14400"/>
  126. <skip>3</skip>
  127. </element-list>
  128. </checks>
  129. </testcase>