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

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