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.

list-nested.fo 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3. <!-- defines the layout master -->
  4. <fo:layout-master-set>
  5. <fo:simple-page-master master-name="first"
  6. page-height="29.7cm" page-width="21cm"
  7. margin-top="1cm"
  8. margin-bottom="2cm"
  9. margin-left="2.5cm"
  10. margin-right="2.5cm">
  11. <fo:region-body margin-top="3cm"/>
  12. <fo:region-before extent="3cm"/>
  13. <fo:region-after extent="1.5cm"/>
  14. </fo:simple-page-master>
  15. </fo:layout-master-set>
  16. <!-- starts actual layout -->
  17. <fo:page-sequence master-reference="first">
  18. <!-- Inserts a header with the page number -->
  19. <fo:static-content flow-name="xsl-region-before">
  20. <fo:block text-align="end" font-size="10pt" font-family="serif" line-height="14pt">
  21. XSL-FO Example: simple list - p. <fo:page-number/>
  22. </fo:block>
  23. </fo:static-content>
  24. <fo:flow flow-name="xsl-region-body">
  25. <!-- title -->
  26. <fo:block font-size="14pt"
  27. font-family="sans-serif"
  28. line-height="18pt"
  29. space-before.optimum="3pt"
  30. space-after.optimum="3pt"
  31. font-weight="bold"
  32. start-indent="15pt">
  33. Validity Constraint: Standalone Document Declaration
  34. </fo:block>
  35. <!-- normal text -->
  36. <fo:block font-size="12pt"
  37. font-family="sans-serif"
  38. line-height="15pt"
  39. space-after.optimum="3pt" >
  40. The standalone document declaration must have the value "no" if
  41. any external markup declarations contain declarations of:
  42. </fo:block>
  43. <!-- list -->
  44. <fo:list-block>
  45. <!-- list item -->
  46. <fo:list-item>
  47. <!-- insert a bullet -->
  48. <fo:list-item-label end-indent="label-end()">
  49. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  50. </fo:list-item-label>
  51. <!-- list text -->
  52. <fo:list-item-body start-indent="body-start()">
  53. <fo:block>
  54. attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or
  55. </fo:block>
  56. </fo:list-item-body>
  57. </fo:list-item>
  58. <!-- list item -->
  59. <fo:list-item>
  60. <!-- insert a bullet -->
  61. <fo:list-item-label end-indent="label-end()">
  62. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  63. </fo:list-item-label>
  64. <!-- list text -->
  65. <fo:list-item-body start-indent="body-start()">
  66. <fo:block>
  67. entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or
  68. </fo:block>
  69. </fo:list-item-body>
  70. </fo:list-item>
  71. <!-- list entry -->
  72. <fo:list-item>
  73. <!-- insert a bullet -->
  74. <fo:list-item-label end-indent="label-end()">
  75. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  76. </fo:list-item-label>
  77. <!-- list text -->
  78. <fo:list-item-body start-indent="body-start()">
  79. <fo:block>
  80. attributes with values subject to normalization, where the attribute appears in the document with a value which will
  81. </fo:block>
  82. </fo:list-item-body>
  83. </fo:list-item>
  84. <!-- list entry -->
  85. <fo:list-item>
  86. <!-- insert a bullet -->
  87. <fo:list-item-label end-indent="label-end()">
  88. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  89. </fo:list-item-label>
  90. <!-- list text -->
  91. <fo:list-item-body start-indent="body-start()">
  92. <fo:block>
  93. change as a result of normalization, or
  94. </fo:block>
  95. </fo:list-item-body>
  96. </fo:list-item>
  97. <!-- list entry -->
  98. <fo:list-item>
  99. <!-- insert a bullet -->
  100. <fo:list-item-label end-indent="label-end()">
  101. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  102. </fo:list-item-label>
  103. <!-- list text -->
  104. <fo:list-item-body start-indent="body-start()">
  105. <fo:block>
  106. element types with element content, if white space occurs directly within any instance of those types.
  107. <fo:list-block>
  108. <fo:list-item>
  109. <fo:list-item-label end-indent="label-end()">
  110. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  111. </fo:list-item-label>
  112. <fo:list-item-body start-indent="body-start()">
  113. <fo:block>This is the first item of a nested list</fo:block>
  114. </fo:list-item-body>
  115. </fo:list-item>
  116. <fo:list-item>
  117. <fo:list-item-label end-indent="label-end()">
  118. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  119. </fo:list-item-label>
  120. <fo:list-item-body start-indent="body-start()">
  121. <fo:block>This is the second item of a nested list</fo:block>
  122. </fo:list-item-body>
  123. </fo:list-item>
  124. <fo:list-item>
  125. <fo:list-item-label end-indent="label-end()">
  126. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  127. </fo:list-item-label>
  128. <fo:list-item-body start-indent="body-start()">
  129. <fo:block>This is the third item of a nested list</fo:block>
  130. </fo:list-item-body>
  131. </fo:list-item>
  132. <fo:list-item>
  133. <fo:list-item-label end-indent="label-end()">
  134. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  135. </fo:list-item-label>
  136. <fo:list-item-body start-indent="body-start()">
  137. <fo:block>This is the fourth item of a nested list</fo:block>
  138. </fo:list-item-body>
  139. </fo:list-item>
  140. <fo:list-item>
  141. <fo:list-item-label end-indent="label-end()">
  142. <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
  143. </fo:list-item-label>
  144. <fo:list-item-body start-indent="body-start()">
  145. <fo:block>This is the fifth item of a nested list</fo:block>
  146. </fo:list-item-body>
  147. </fo:list-item>
  148. </fo:list-block>
  149. </fo:block>
  150. </fo:list-item-body>
  151. </fo:list-item>
  152. </fo:list-block>
  153. <!-- end list -->
  154. </fo:flow>
  155. </fo:page-sequence>
  156. </fo:root>