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.

pagelevel2.fo 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. This file addresses break-after's in page context.
  4. -->
  5. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  6. <fo:layout-master-set>
  7. <!-- layout for all pages -->
  8. <fo:simple-page-master master-name="all"
  9. page-height="29.7cm"
  10. page-width="21cm"
  11. margin-top="1cm"
  12. margin-bottom="2cm"
  13. margin-left="2.5cm"
  14. margin-right="2.5cm">
  15. <fo:region-body margin-top="3cm" margin-bottom="2cm"/>
  16. <fo:region-before extent="3cm"/>
  17. <fo:region-after extent="2cm"/>
  18. </fo:simple-page-master>
  19. </fo:layout-master-set>
  20. <fo:page-sequence master-reference="all">
  21. <fo:static-content flow-name="xsl-region-after">
  22. <fo:block font-size="10pt" text-align="start"
  23. border-style="solid" border-color="blue" border-width="0.5pt"
  24. space-before.optimum="6pt">
  25. Text excerpt from XSL Candidate Recommendation, 21 Nov 2000.
  26. </fo:block>
  27. </fo:static-content>
  28. <fo:flow flow-name="xsl-region-body">
  29. <fo:block
  30. font-size="14pt" font-family="sans-serif"
  31. line-height="18pt" space-after.optimum="15pt">
  32. Keep and break conditions apply to a class of areas, which are typically
  33. page-reference-areas, column-areas, and line-areas. The appropriate class
  34. for a given condition is referred to as a context and an area in this
  35. class is a context-area. As defined in Section 6.4.1, page-reference-areas
  36. are areas generated by an fo:page-sequence using the specifications in a
  37. fo:page-master, and column-areas are normal-flow-reference-areas generated
  38. from a region-body, or region-reference-areas generated from other types
  39. of region-master.
  40. </fo:block>
  41. <fo:block
  42. font-size="14pt" font-family="sans-serif"
  43. line-height="18pt" space-after.optimum="15pt">
  44. A keep or break condition is an open statement about a formatting object
  45. and the tree relationships of the areas it generates with the relevant
  46. context-areas. These tree relationships are defined mainly in terms of
  47. leading or trailing areas. If A is a descendant of P, then A is defined
  48. to be leading in P if A has no preceding sibling which is a normal area,
  49. nor does any of its ancestor areas up to but not including P. Similarly,
  50. A is defined to be trailing in P if A has no following sibling which is
  51. a normal area, nor does any of its ancestor areas up to but not including P.
  52. For any given formatting object, the next formatting object in the flow is
  53. the first formatting object following (in the pre-order traversal order)
  54. which generates and returns normal areas.
  55. </fo:block>
  56. <fo:block
  57. font-size="14pt" font-family="sans-serif"
  58. line-height="18pt" space-after.optimum="15pt">
  59. Break conditions are either break-before or break-after conditions.
  60. A break-before condition is satisfied if the first area generated and
  61. returned by the formatting object is leading within a context-area. A
  62. break-after condition depends on the next formatting object in the flow;
  63. it is satisfied if either there is no such next formatting object, or
  64. if the first normal area generated and returned by that formatting
  65. object is leading in a context-area.
  66. </fo:block>
  67. <fo:block
  68. font-size="14pt" font-family="sans-serif"
  69. line-height="18pt" space-after.optimum="15pt"
  70. color="blue"
  71. break-after="even-page">
  72. This is a block with a <fo:inline font-style="italic">break-after="even-page"
  73. </fo:inline> break condition. This condition is satisfied if there is
  74. no next formatting object, <fo:inline font-weight="bold">or</fo:inline> the
  75. first normal area generated by the next FO is leading in an even-page
  76. context.
  77. </fo:block>
  78. <fo:block
  79. font-size="14pt" font-family="sans-serif"
  80. line-height="18pt" space-after.optimum="15pt">
  81. Break conditions are imposed by the break-before and break-after
  82. properties. A refined value of page for these traits imposes a break
  83. condition with a context consisting of the page-reference-areas; a
  84. value of even-page or odd-page imposes a break condition with a
  85. context of even-numbered page-reference-areas or odd-numbered page
  86. reference-areas, respectively; a value of column imposes a break
  87. condition with a context of column-areas. A value of auto in a
  88. break-before or break-after trait imposes no break condition.
  89. </fo:block>
  90. <fo:block
  91. font-size="14pt" font-family="sans-serif"
  92. line-height="18pt" space-after.optimum="15pt">
  93. Keep conditions are either keep-with-previous, keep-with-next, or
  94. keep-together conditions. A keep-with-previous condition on an
  95. object is satisfied if the first area generated and returned by
  96. the formatting object is not leading within a context-area, or
  97. if there are no preceding areas in a post-order traversal of the
  98. area tree. A keep-with-next condition is satisfied if the last
  99. area generated and returned by the formatting object is not
  100. trailing within a context-area, or if there are no following
  101. areas in a pre-order traversal of the area tree. A keep-together
  102. condition is satisfied if all areas generated and returned by
  103. the formatting object are descendants of a single context-area.
  104. </fo:block>
  105. <fo:block
  106. font-size="14pt" font-family="sans-serif"
  107. line-height="18pt" space-after.optimum="15pt"
  108. color="blue"
  109. break-after="even-page">
  110. This is a block with a <fo:inline font-style="italic">break-after="even-page"
  111. </fo:inline> break condition. This condition is satisfied if there is
  112. no next formatting object, <fo:inline font-weight="bold">or</fo:inline> the
  113. first normal area generated by the next FO is leading in an even-page
  114. context.
  115. </fo:block>
  116. <fo:block
  117. font-size="14pt" font-family="sans-serif"
  118. line-height="18pt" space-after.optimum="15pt">
  119. Keep conditions are imposed by the "within-page", "within-column",
  120. and "within-line" components of the "keep-with-previous",
  121. "keep-with-next", and "keep-together" properties. The refined value
  122. of each component specifies the strength of the keep condition
  123. imposed, with higher numbers being stronger than lower numbers and
  124. the value always being stronger than all numeric values. A component
  125. with value auto does not impose a keep condition. A "within-page"
  126. component imposes a keep-condition with context consisting of the
  127. page-reference-areas; "within-column", with context consisting of
  128. the column-areas; and "within-line" with context consisting of the
  129. line-areas.
  130. </fo:block>
  131. <fo:block
  132. font-size="14pt" font-family="sans-serif"
  133. line-height="18pt" space-after.optimum="15pt">
  134. The area tree is constrained to satisfy all break conditions imposed.
  135. Each keep condition must also be satisfied, except when this would
  136. cause a break condition or a stronger keep condition to fail to be
  137. satisfied. If not all of a set of keep conditions of equal strength
  138. can be satisfied, then some maximal satisfiable subset of conditions
  139. of that strength must be satisfied (together with all break conditions
  140. and maximal subsets of stronger keep conditions, if any).
  141. </fo:block>
  142. <fo:block>
  143. <fo:leader leader-pattern="rule"
  144. rule-thickness="2.0pt"
  145. leader-length="14cm"
  146. space-before.optimum="0pt"
  147. space-after.optimum="12pt"
  148. start-indent="1cm"
  149. end-indent="1cm"
  150. background-color="blue"
  151. color="yellow"/>
  152. </fo:block>
  153. <fo:block
  154. font-size="14pt" font-family="sans-serif"
  155. line-height="18pt" space-after.optimum="15pt">
  156. Keep and break conditions apply to a class of areas, which are typically
  157. page-reference-areas, column-areas, and line-areas. The appropriate class
  158. for a given condition is referred to as a context and an area in this
  159. class is a context-area. As defined in Section 6.4.1, page-reference-areas
  160. are areas generated by an fo:page-sequence using the specifications in a
  161. fo:page-master, and column-areas are normal-flow-reference-areas generated
  162. from a region-body, or region-reference-areas generated from other types
  163. of region-master.
  164. </fo:block>
  165. <fo:block
  166. font-size="14pt" font-family="sans-serif"
  167. line-height="18pt" space-after.optimum="15pt">
  168. A keep or break condition is an open statement about a formatting object
  169. and the tree relationships of the areas it generates with the relevant
  170. context-areas. These tree relationships are defined mainly in terms of
  171. leading or trailing areas. If A is a descendant of P, then A is defined
  172. to be leading in P if A has no preceding sibling which is a normal area,
  173. nor does any of its ancestor areas up to but not including P. Similarly,
  174. A is defined to be trailing in P if A has no following sibling which is
  175. a normal area, nor does any of its ancestor areas up to but not including P.
  176. For any given formatting object, the next formatting object in the flow is
  177. the first formatting object following (in the pre-order traversal order)
  178. which generates and returns normal areas.
  179. </fo:block>
  180. <fo:block
  181. font-size="14pt" font-family="sans-serif"
  182. line-height="18pt" space-after.optimum="15pt"
  183. color="blue"
  184. break-after="odd-page">
  185. This is a block with a <fo:inline font-style="italic">break-after="odd-page"
  186. </fo:inline> break condition. This condition is satisfied if there is
  187. no next formatting object, <fo:inline font-weight="bold">or</fo:inline> the
  188. first normal area generated by the next FO is leading in an odd-page
  189. context.
  190. </fo:block>
  191. <fo:block
  192. font-size="14pt" font-family="sans-serif"
  193. line-height="18pt" space-after.optimum="15pt">
  194. Break conditions are either break-before or break-after conditions.
  195. A break-before condition is satisfied if the first area generated and
  196. returned by the formatting object is leading within a context-area. A
  197. break-after condition depends on the next formatting object in the flow;
  198. it is satisfied if either there is no such next formatting object, or
  199. if the first normal area generated and returned by that formatting
  200. object is leading in a context-area.
  201. </fo:block>
  202. <fo:block
  203. font-size="14pt" font-family="sans-serif"
  204. line-height="18pt" space-after.optimum="15pt">
  205. Break conditions are imposed by the break-before and break-after
  206. properties. A refined value of page for these traits imposes a break
  207. condition with a context consisting of the page-reference-areas; a
  208. value of even-page or odd-page imposes a break condition with a
  209. context of even-numbered page-reference-areas or odd-numbered page
  210. reference-areas, respectively; a value of column imposes a break
  211. condition with a context of column-areas. A value of auto in a
  212. break-before or break-after trait imposes no break condition.
  213. </fo:block>
  214. <fo:block
  215. font-size="14pt" font-family="sans-serif"
  216. line-height="18pt" space-after.optimum="15pt">
  217. Keep conditions are either keep-with-previous, keep-with-next, or
  218. keep-together conditions. A keep-with-previous condition on an
  219. object is satisfied if the first area generated and returned by
  220. the formatting object is not leading within a context-area, or
  221. if there are no preceding areas in a post-order traversal of the
  222. area tree. A keep-with-next condition is satisfied if the last
  223. area generated and returned by the formatting object is not
  224. trailing within a context-area, or if there are no following
  225. areas in a pre-order traversal of the area tree. A keep-together
  226. condition is satisfied if all areas generated and returned by
  227. the formatting object are descendants of a single context-area.
  228. </fo:block>
  229. <fo:block
  230. font-size="14pt" font-family="sans-serif"
  231. line-height="18pt" space-after.optimum="15pt">
  232. Keep conditions are imposed by the "within-page", "within-column",
  233. and "within-line" components of the "keep-with-previous",
  234. "keep-with-next", and "keep-together" properties. The refined value
  235. of each component specifies the strength of the keep condition
  236. imposed, with higher numbers being stronger than lower numbers and
  237. the value always being stronger than all numeric values. A component
  238. with value auto does not impose a keep condition. A "within-page"
  239. component imposes a keep-condition with context consisting of the
  240. page-reference-areas; "within-column", with context consisting of
  241. the column-areas; and "within-line" with context consisting of the
  242. line-areas.
  243. </fo:block>
  244. <fo:block
  245. font-size="14pt" font-family="sans-serif"
  246. line-height="18pt" space-after.optimum="15pt"
  247. color="blue"
  248. break-after="odd-page">
  249. This is a block with a <fo:inline font-style="italic">break-after="odd-page"
  250. </fo:inline> break condition. This condition is satisfied if there is
  251. no next formatting object, <fo:inline font-weight="bold">or</fo:inline> the
  252. first normal area generated by the next FO is leading in an odd-page
  253. context.
  254. </fo:block>
  255. <fo:block
  256. font-size="14pt" font-family="sans-serif"
  257. line-height="18pt" space-after.optimum="15pt">
  258. The area tree is constrained to satisfy all break conditions imposed.
  259. Each keep condition must also be satisfied, except when this would
  260. cause a break condition or a stronger keep condition to fail to be
  261. satisfied. If not all of a set of keep conditions of equal strength
  262. can be satisfied, then some maximal satisfiable subset of conditions
  263. of that strength must be satisfied (together with all break conditions
  264. and maximal subsets of stronger keep conditions, if any).
  265. </fo:block>
  266. </fo:flow>
  267. </fo:page-sequence>
  268. </fo:root>