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.

pagelevel1.fo 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. This file addresses breaks 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. 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-after="page">
  60. <fo:inline color="red">break-after="page"</fo:inline>
  61. Break conditions are either break-before or break-after conditions.
  62. A break-before condition is satisfied if the first area generated and
  63. returned by the formatting object is leading within a context-area. A
  64. break-after condition depends on the next formatting object in the flow;
  65. it is satisfied if either there is no such next formatting object, or
  66. if the first normal area generated and returned by that formatting
  67. object is leading in a context-area.
  68. </fo:block>
  69. <fo:block
  70. font-size="14pt" font-family="sans-serif"
  71. line-height="18pt" space-after.optimum="15pt">
  72. Break conditions are imposed by the break-before and break-after
  73. properties. A refined value of page for these traits imposes a break
  74. condition with a context consisting of the page-reference-areas; a
  75. value of even-page or odd-page imposes a break condition with a
  76. context of even-numbered page-reference-areas or odd-numbered page
  77. reference-areas, respectively; a value of column imposes a break
  78. condition with a context of column-areas. A value of auto in a
  79. break-before or break-after trait imposes no break condition.
  80. </fo:block>
  81. <fo:block
  82. font-size="14pt" font-family="sans-serif"
  83. line-height="18pt" space-after.optimum="15pt">
  84. Keep conditions are either keep-with-previous, keep-with-next, or
  85. keep-together conditions. A keep-with-previous condition on an
  86. object is satisfied if the first area generated and returned by
  87. the formatting object is not leading within a context-area, or
  88. if there are no preceding areas in a post-order traversal of the
  89. area tree. A keep-with-next condition is satisfied if the last
  90. area generated and returned by the formatting object is not
  91. trailing within a context-area, or if there are no following
  92. areas in a pre-order traversal of the area tree. A keep-together
  93. condition is satisfied if all areas generated and returned by
  94. the formatting object are descendants of a single context-area.
  95. </fo:block>
  96. <fo:block
  97. font-size="14pt" font-family="sans-serif"
  98. line-height="18pt" space-after.optimum="15pt">
  99. Keep conditions are imposed by the "within-page", "within-column",
  100. and "within-line" components of the "keep-with-previous",
  101. "keep-with-next", and "keep-together" properties. The refined value
  102. of each component specifies the strength of the keep condition
  103. imposed, with higher numbers being stronger than lower numbers and
  104. the value always being stronger than all numeric values. A component
  105. with value auto does not impose a keep condition. A "within-page"
  106. component imposes a keep-condition with context consisting of the
  107. page-reference-areas; "within-column", with context consisting of
  108. the column-areas; and "within-line" with context consisting of the
  109. line-areas.
  110. </fo:block>
  111. <fo:block
  112. font-size="14pt" font-family="sans-serif"
  113. line-height="18pt" space-after.optimum="15pt"
  114. break-before="page">
  115. <fo:inline color="red">break-before="page"</fo:inline>
  116. The area tree is constrained to satisfy all break conditions imposed.
  117. Each keep condition must also be satisfied, except when this would
  118. cause a break condition or a stronger keep condition to fail to be
  119. satisfied. If not all of a set of keep conditions of equal strength
  120. can be satisfied, then some maximal satisfiable subset of conditions
  121. of that strength must be satisfied (together with all break conditions
  122. and maximal subsets of stronger keep conditions, if any).
  123. </fo:block>
  124. </fo:flow>
  125. </fo:page-sequence>
  126. </fo:root>