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.

pagelevel3.fo 13KB

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