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.

break.fo 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3. <fo:layout-master-set>
  4. <fo:simple-page-master master-name="first"
  5. margin-right="1.5cm"
  6. margin-left="1.5cm"
  7. margin-bottom="2cm"
  8. margin-top="1cm"
  9. page-width="21cm"
  10. page-height="17cm">
  11. <fo:region-before extent="1cm"/>
  12. <fo:region-body margin-top="1cm"/>
  13. <fo:region-after extent="1.5cm"/>
  14. </fo:simple-page-master>
  15. </fo:layout-master-set>
  16. <fo:page-sequence master-reference="first">
  17. <fo:static-content flow-name="xsl-region-before">
  18. <fo:block line-height="14pt" font-size="10pt"
  19. text-align="end">table examples</fo:block>
  20. </fo:static-content>
  21. <fo:static-content flow-name="xsl-region-after">
  22. <fo:block line-height="14pt" font-size="10pt"
  23. text-align="end">Page <fo:page-number/></fo:block>
  24. </fo:static-content>
  25. <fo:flow flow-name="xsl-region-body">
  26. <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
  27. Tests for breaks on table rows.
  28. </fo:block>
  29. <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
  30. Table 1: basic break after with next
  31. </fo:block>
  32. <fo:table border-width="0.5pt" border-color="red">
  33. <fo:table-column column-width="3cm"/>
  34. <fo:table-column column-width="3cm"/>
  35. <fo:table-column column-width="3cm"/>
  36. <fo:table-body>
  37. <fo:table-row border-width="0.5pt" break-after="page">
  38. <fo:table-cell>
  39. <fo:block text-align="center">
  40. first row
  41. </fo:block>
  42. </fo:table-cell>
  43. <fo:table-cell>
  44. <fo:block text-align="center">
  45. new page
  46. </fo:block>
  47. </fo:table-cell>
  48. <fo:table-cell>
  49. <fo:block text-align="center">
  50. for next
  51. </fo:block>
  52. </fo:table-cell>
  53. </fo:table-row>
  54. <fo:table-row border-width="0.5pt">
  55. <fo:table-cell>
  56. <fo:block text-align="center">
  57. second row
  58. </fo:block>
  59. </fo:table-cell>
  60. <fo:table-cell>
  61. <fo:block text-align="center">
  62. normal
  63. </fo:block>
  64. </fo:table-cell>
  65. <fo:table-cell>
  66. <fo:block text-align="center">
  67. row
  68. </fo:block>
  69. </fo:table-cell>
  70. </fo:table-row>
  71. </fo:table-body>
  72. </fo:table>
  73. <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
  74. Table 2: basic break before with next
  75. </fo:block>
  76. <fo:table border-width="0.5pt" border-color="red">
  77. <fo:table-column column-width="3cm"/>
  78. <fo:table-column column-width="3cm"/>
  79. <fo:table-column column-width="3cm"/>
  80. <fo:table-body>
  81. <fo:table-row border-width="0.5pt">
  82. <fo:table-cell>
  83. <fo:block text-align="center">
  84. first row
  85. </fo:block>
  86. </fo:table-cell>
  87. <fo:table-cell>
  88. <fo:block text-align="center">
  89. new page
  90. </fo:block>
  91. </fo:table-cell>
  92. <fo:table-cell>
  93. <fo:block text-align="center">
  94. for next
  95. </fo:block>
  96. </fo:table-cell>
  97. </fo:table-row>
  98. <fo:table-row border-width="0.5pt" break-before="page">
  99. <fo:table-cell>
  100. <fo:block text-align="center">
  101. second row
  102. </fo:block>
  103. </fo:table-cell>
  104. <fo:table-cell>
  105. <fo:block text-align="center">
  106. break before
  107. </fo:block>
  108. </fo:table-cell>
  109. <fo:table-cell>
  110. <fo:block text-align="center">
  111. row
  112. </fo:block>
  113. </fo:table-cell>
  114. </fo:table-row>
  115. </fo:table-body>
  116. </fo:table>
  117. <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
  118. Table 3: basic break before a keep with next
  119. </fo:block>
  120. <fo:table border-width="0.5pt" border-color="red">
  121. <fo:table-column column-width="3cm"/>
  122. <fo:table-column column-width="3cm"/>
  123. <fo:table-column column-width="3cm"/>
  124. <fo:table-body>
  125. <fo:table-row border-width="0.5pt" keep-with-next="always">
  126. <fo:table-cell>
  127. <fo:block text-align="center">
  128. first row
  129. </fo:block>
  130. </fo:table-cell>
  131. <fo:table-cell>
  132. <fo:block text-align="center">
  133. new page
  134. </fo:block>
  135. </fo:table-cell>
  136. <fo:table-cell>
  137. <fo:block text-align="center">
  138. for next
  139. </fo:block>
  140. </fo:table-cell>
  141. </fo:table-row>
  142. <fo:table-row border-width="0.5pt" break-before="page">
  143. <fo:table-cell>
  144. <fo:block text-align="center">
  145. second row
  146. </fo:block>
  147. </fo:table-cell>
  148. <fo:table-cell>
  149. <fo:block text-align="center">
  150. break before
  151. </fo:block>
  152. </fo:table-cell>
  153. <fo:table-cell>
  154. <fo:block text-align="center">
  155. row
  156. </fo:block>
  157. </fo:table-cell>
  158. </fo:table-row>
  159. </fo:table-body>
  160. </fo:table>
  161. <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
  162. Table 4: basic break after a keep with previous
  163. </fo:block>
  164. <fo:table border-width="0.5pt" border-color="red">
  165. <fo:table-column column-width="3cm"/>
  166. <fo:table-column column-width="3cm"/>
  167. <fo:table-column column-width="3cm"/>
  168. <fo:table-body>
  169. <fo:table-row border-width="0.5pt" break-after="page">
  170. <fo:table-cell>
  171. <fo:block text-align="center">
  172. first row
  173. </fo:block>
  174. </fo:table-cell>
  175. <fo:table-cell>
  176. <fo:block text-align="center">
  177. new page
  178. </fo:block>
  179. </fo:table-cell>
  180. <fo:table-cell>
  181. <fo:block text-align="center">
  182. for next
  183. </fo:block>
  184. </fo:table-cell>
  185. </fo:table-row>
  186. <fo:table-row border-width="0.5pt" keep-with-previous="always">
  187. <fo:table-cell>
  188. <fo:block text-align="center">
  189. second row
  190. </fo:block>
  191. </fo:table-cell>
  192. <fo:table-cell>
  193. <fo:block text-align="center">
  194. break before
  195. </fo:block>
  196. </fo:table-cell>
  197. <fo:table-cell>
  198. <fo:block text-align="center">
  199. row
  200. </fo:block>
  201. </fo:table-cell>
  202. </fo:table-row>
  203. </fo:table-body>
  204. </fo:table>
  205. <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
  206. Table 5: basic break after a keep with previous
  207. </fo:block>
  208. <fo:table border-width="0.5pt" border-color="red">
  209. <fo:table-column column-width="3cm"/>
  210. <fo:table-column column-width="3cm"/>
  211. <fo:table-column column-width="3cm"/>
  212. <fo:table-body>
  213. <fo:table-row border-width="0.5pt">
  214. <fo:table-cell>
  215. <fo:block text-align="center">
  216. normal
  217. </fo:block>
  218. </fo:table-cell>
  219. <fo:table-cell>
  220. <fo:block text-align="center">
  221. row
  222. </fo:block>
  223. </fo:table-cell>
  224. <fo:table-cell>
  225. <fo:block text-align="center">
  226. with text
  227. </fo:block>
  228. </fo:table-cell>
  229. </fo:table-row>
  230. <fo:table-row border-width="0.5pt">
  231. <fo:table-cell>
  232. <fo:block text-align="center">
  233. normal
  234. </fo:block>
  235. </fo:table-cell>
  236. <fo:table-cell>
  237. <fo:block text-align="center">
  238. row
  239. </fo:block>
  240. </fo:table-cell>
  241. <fo:table-cell>
  242. <fo:block text-align="center">
  243. with text
  244. </fo:block>
  245. </fo:table-cell>
  246. </fo:table-row>
  247. <fo:table-row border-width="0.5pt" keep-with-next="always">
  248. <fo:table-cell>
  249. <fo:block text-align="center">
  250. normal
  251. </fo:block>
  252. </fo:table-cell>
  253. <fo:table-cell>
  254. <fo:block text-align="center">
  255. row
  256. </fo:block>
  257. </fo:table-cell>
  258. <fo:table-cell>
  259. <fo:block text-align="center">
  260. with text
  261. </fo:block>
  262. </fo:table-cell>
  263. </fo:table-row>
  264. <fo:table-row border-width="0.5pt" keep-with-next="always" break-after="page">
  265. <fo:table-cell>
  266. <fo:block text-align="center">
  267. break after
  268. </fo:block>
  269. </fo:table-cell>
  270. <fo:table-cell>
  271. <fo:block text-align="center">
  272. and
  273. </fo:block>
  274. </fo:table-cell>
  275. <fo:table-cell>
  276. <fo:block text-align="center">
  277. keep with next
  278. </fo:block>
  279. </fo:table-cell>
  280. </fo:table-row>
  281. <fo:table-row border-width="0.5pt" keep-with-next="always">
  282. <fo:table-cell>
  283. <fo:block text-align="center">
  284. keep
  285. </fo:block>
  286. </fo:table-cell>
  287. <fo:table-cell>
  288. <fo:block text-align="center">
  289. with
  290. </fo:block>
  291. </fo:table-cell>
  292. <fo:table-cell>
  293. <fo:block text-align="center">
  294. next
  295. </fo:block>
  296. </fo:table-cell>
  297. </fo:table-row>
  298. </fo:table-body>
  299. </fo:table>
  300. </fo:flow>
  301. </fo:page-sequence>
  302. </fo:root>