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

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