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.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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 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. Text excerpt from XSL Candidate Recommendation, 21 Nov 2000.
  25. </fo:block>
  26. </fo:static-content>
  27. <fo:flow flow-name="xsl-region-body">
  28. <fo:block
  29. font-size="14pt" font-family="sans-serif"
  30. line-height="18pt" space-after.optimum="15pt">
  31. Keep and break conditions apply to a class of areas, which are typically
  32. page-reference-areas, column-areas, and line-areas. The appropriate class
  33. for a given condition is referred to as a context and an area in this
  34. class is a context-area. As defined in Section 6.4.1, page-reference-areas
  35. are areas generated by an fo:page-sequence using the specifications in a
  36. fo:page-master, and column-areas are normal-flow-reference-areas generated
  37. from a region-body, or region-reference-areas generated from other types
  38. of region-master.
  39. </fo:block>
  40. <fo:block
  41. font-size="14pt" font-family="sans-serif"
  42. line-height="18pt" space-after.optimum="15pt">
  43. A keep or break condition is an open statement about a formatting object
  44. and the tree relationships of the areas it generates with the relevant
  45. context-areas. These tree relationships are defined mainly in terms of
  46. leading or trailing areas. If A is a descendant of P, then A is defined
  47. to be leading in P if A has no preceding sibling which is a normal area,
  48. nor does any of its ancestor areas up to but not including P. Similarly,
  49. A is defined to be trailing in P if A has no following sibling which is
  50. a normal area, nor does any of its ancestor areas up to but not including P.
  51. For any given formatting object, the next formatting object in the flow is
  52. the first formatting object following (in the pre-order traversal order)
  53. which generates and returns normal areas.
  54. </fo:block>
  55. <fo:block
  56. font-size="14pt" font-family="sans-serif"
  57. line-height="18pt" space-after.optimum="15pt"
  58. break-after="page">
  59. <fo:inline color="red">break-after="page"</fo:inline>
  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. Break conditions are imposed by the break-before and break-after
  72. properties. A refined value of page for these traits imposes a break
  73. condition with a context consisting of the page-reference-areas; a
  74. value of even-page or odd-page imposes a break condition with a
  75. context of even-numbered page-reference-areas or odd-numbered page
  76. reference-areas, respectively; a value of column imposes a break
  77. condition with a context of column-areas. A value of auto in a
  78. break-before or break-after trait imposes no break condition.
  79. </fo:block>
  80. <fo:block
  81. font-size="14pt" font-family="sans-serif"
  82. line-height="18pt" space-after.optimum="15pt">
  83. Keep conditions are either keep-with-previous, keep-with-next, or
  84. keep-together conditions. A keep-with-previous condition on an
  85. object is satisfied if the first area generated and returned by
  86. the formatting object is not leading within a context-area, or
  87. if there are no preceding areas in a post-order traversal of the
  88. area tree. A keep-with-next condition is satisfied if the last
  89. area generated and returned by the formatting object is not
  90. trailing within a context-area, or if there are no following
  91. areas in a pre-order traversal of the area tree. A keep-together
  92. condition is satisfied if all areas generated and returned by
  93. the formatting object are descendants of a single context-area.
  94. </fo:block>
  95. <fo:block
  96. font-size="14pt" font-family="sans-serif"
  97. line-height="18pt" space-after.optimum="15pt">
  98. Keep conditions are imposed by the "within-page", "within-column",
  99. and "within-line" components of the "keep-with-previous",
  100. "keep-with-next", and "keep-together" properties. The refined value
  101. of each component specifies the strength of the keep condition
  102. imposed, with higher numbers being stronger than lower numbers and
  103. the value always being stronger than all numeric values. A component
  104. with value auto does not impose a keep condition. A "within-page"
  105. component imposes a keep-condition with context consisting of the
  106. page-reference-areas; "within-column", with context consisting of
  107. the column-areas; and "within-line" with context consisting of the
  108. line-areas.
  109. </fo:block>
  110. <fo:block
  111. font-size="14pt" font-family="sans-serif"
  112. line-height="18pt" space-after.optimum="15pt"
  113. break-before="page">
  114. <fo:inline color="red">break-before="page"</fo:inline>
  115. The area tree is constrained to satisfy all break conditions imposed.
  116. Each keep condition must also be satisfied, except when this would
  117. cause a break condition or a stronger keep condition to fail to be
  118. satisfied. If not all of a set of keep conditions of equal strength
  119. can be satisfied, then some maximal satisfiable subset of conditions
  120. of that strength must be satisfied (together with all break conditions
  121. and maximal subsets of stronger keep conditions, if any).
  122. </fo:block>
  123. </fo:flow>
  124. </fo:page-sequence>
  125. </fo:root>