Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

extensive.fo 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  2. <fo:layout-master-set>
  3. <fo:simple-page-master master-name="one">
  4. <fo:region-body margin-top="50pt" margin-bottom="50pt" margin-left="100pt" margin-right="100pt"/>
  5. </fo:simple-page-master>
  6. </fo:layout-master-set>
  7. <fo:page-sequence master-reference="one">
  8. <fo:flow flow-name="xsl-region-body">
  9. <fo:block>A Block</fo:block>
  10. <fo:block text-align="end">An End Aligned Block</fo:block>
  11. <fo:block text-align="center">A Centered Block</fo:block>
  12. <fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks. Alignment is default.</fo:block>
  13. <fo:block text-align="end">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. Alignment is end.</fo:block>
  14. <fo:block text-align="center">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. Alignment is centered.</fo:block>
  15. <fo:block text-align="justify">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. I'm going to keep going so I can get three lines to check how all but the last justify. There, that should do it. Alignment is justified.</fo:block>
  16. <fo:block>A block for comparison</fo:block>
  17. <fo:block space-before.optimum="12pt">A block with 12pt space-before</fo:block>
  18. <fo:block>A block for comparison</fo:block>
  19. <fo:block space-after.optimum="12pt">A block with 12pt space-after</fo:block>
  20. <fo:block>A block for comparison</fo:block>
  21. <fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block with both 12pt space-before and space-after</fo:block>
  22. <fo:block>A block for comparison</fo:block>
  23. <fo:block start-indent="50pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. There is a start-indent of 50pt.</fo:block>
  24. <fo:block end-indent="50pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. There is an end-indent of 50pt.</fo:block>
  25. <fo:block start-indent="50pt" end-indent="50pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. There is a start-indent and end-indent of 50pt.</fo:block>
  26. <fo:block font-size="15pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The font-size is set to 15pt.</fo:block>
  27. <fo:block line-height="20pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The line-height is set to 20pt.</fo:block>
  28. <fo:block font-size="15pt" line-height="20pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The font-size is set to 15pt and the line-height is set to 20pt.</fo:block>
  29. <fo:block font-size="15pt" line-height="15pt">This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The font-size is set to 15pt and the line-height is set to 15pt.</fo:block>
  30. <fo:block space-before.optimum="12pt" space-after.optimum="12pt"><fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block</fo:block></fo:block>
  31. <fo:block space-before.optimum="12pt" space-after.optimum="12pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block</fo:block>Text after</fo:block>
  32. <fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block with 50pt start-intent</fo:block>Text after</fo:block>
  33. <fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">And again for the page break, text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block within a block with 50pt start-intent</fo:block>Text after</fo:block>
  34. <fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt">A block with 50pt start-indent within a block with 50pt start-intent</fo:block>Text after</fo:block>
  35. <fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="50pt">Text before<fo:block space-before.optimum="12pt" space-after.optimum="12pt" start-indent="100pt">A block with 100pt start-indent within a block with 50pt start-intent</fo:block>Text after</fo:block>
  36. <fo:list-block provisional-distance-between-starts="12pt" space-before.optimum="12pt" text-align="justify">
  37. <fo:list-item>
  38. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  39. <fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body>
  40. </fo:list-item>
  41. <fo:list-item>
  42. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  43. <fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body>
  44. </fo:list-item>
  45. </fo:list-block>
  46. <fo:list-block start-indent="50pt" provisional-distance-between-starts="12pt" space-before.optimum="12pt" text-align="justify">
  47. <fo:list-item>
  48. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  49. <fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks. The list-block has a start-indent of 50pt and a text-align of justified.</fo:block></fo:list-item-body>
  50. </fo:list-item>
  51. <fo:list-item>
  52. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  53. <fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a second multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a third multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body>
  54. </fo:list-item>
  55. </fo:list-block>
  56. <fo:list-block provisional-distance-between-starts="12pt" space-before.optimum="12pt" text-align="justify">
  57. <fo:list-item>
  58. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  59. <fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block start-indent="100pt">This is a multiple line block with start-indent 100pt that extends over more than one line. There should be appropriate line breaks.</fo:block><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body>
  60. </fo:list-item>
  61. <fo:list-item>
  62. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  63. <fo:list-item-body start-indent="body-start()"><fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.<fo:block>This is an embedded multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block>This is a multiple line block that extends over more than one line. There should be appropriate line breaks.</fo:block></fo:list-item-body>
  64. </fo:list-item>
  65. </fo:list-block>
  66. <fo:list-block provisional-distance-between-starts="12pt" space-before.optimum="12pt">
  67. <fo:list-item>
  68. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  69. <fo:list-item-body start-indent="body-start()"><fo:block>A block in a list-item-body</fo:block></fo:list-item-body>
  70. </fo:list-item>
  71. <fo:list-item>
  72. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  73. <fo:list-item-body start-indent="body-start()">
  74. <fo:list-block provisional-distance-between-starts="12pt">
  75. <fo:list-item>
  76. <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
  77. <fo:list-item-body start-indent="body-start()"><fo:block>This is a list item in a list that is itself a list item</fo:block></fo:list-item-body>
  78. </fo:list-item>
  79. </fo:list-block>
  80. </fo:list-item-body>
  81. </fo:list-item>
  82. </fo:list-block>
  83. <fo:block break-before="page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Next Stage</fo:block>
  84. <fo:block>Right, now we are ready to try some newly implemented things like rules. What follows is a display rule of default thickness 1pt and a space-before and space-after of 12pt.</fo:block>
  85. <fo:block><fo:leader leader-pattern="rule" space-before.optimum="12pt" space-after.optimum="12pt"/></fo:block>
  86. <fo:block>Now what follows is a leader of thickness 5pt with start-indent of 100pt (same space-before/after as before).</fo:block>
  87. <fo:block><fo:leader leader-pattern="rule" space-before.optimum="12pt" space-after.optimum="12pt" rule-thickness="5pt" start-indent="100pt"/></fo:block>
  88. <fo:block font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt"
  89. ><fo:inline color="#500">C</fo:inline
  90. ><fo:inline color="#700">o</fo:inline
  91. ><fo:inline color="#900">l</fo:inline
  92. ><fo:inline color="#B00">o</fo:inline
  93. ><fo:inline color="#D00">u</fo:inline
  94. ><fo:inline color="#F00">r</fo:inline
  95. ></fo:block>
  96. <fo:block color="black">black</fo:block>
  97. <fo:block color="green">green</fo:block>
  98. <fo:block color="silver">silver</fo:block>
  99. <fo:block color="lime">lime</fo:block>
  100. <fo:block color="gray">gray</fo:block>
  101. <fo:block color="olive">olive</fo:block>
  102. <fo:block color="white">white</fo:block>
  103. <fo:block color="yellow">yellow</fo:block>
  104. <fo:block color="maroon">maroon</fo:block>
  105. <fo:block color="navy">navy</fo:block>
  106. <fo:block color="red">red</fo:block>
  107. <fo:block color="blue">blue</fo:block>
  108. <fo:block color="purple">purple</fo:block>
  109. <fo:block color="teal">teal</fo:block>
  110. <fo:block color="fuchsia">fuchsia</fo:block>
  111. <fo:block color="aqua">aqua</fo:block>
  112. <fo:block break-before="even-page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Wrap</fo:block>
  113. <fo:block space-before.optimum="12pt">This is a rather long sentence that is going to keep on going and going, not really to demonstrate anything other that normal wrapping because the following paragraph will show what happens when wrap-option is set to no-wrap.</fo:block>
  114. <fo:block space-before.optimum="12pt" wrap-option="no-wrap">This is a rather long sentence that is going to keep on going and going to demonstrate what happens when wrap-option is set to no-wrap which is unlike the preceding sentence where it defaults to wrap.</fo:block>
  115. <fo:block space-before.optimum="12pt" wrap-option="wrap">This is a rather long sentence that is going to keep on going and going, not really to demonstrate anything other that normal wrapping but it differs from the first of these three sentences in that wrap is set explicitly.</fo:block>
  116. <fo:block font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">White Space Collapse</fo:block>
  117. <fo:block>This is default!</fo:block>
  118. <fo:block white-space-collapse="false">This is false!</fo:block>
  119. <fo:block white-space-collapse="true">This is true!</fo:block>
  120. <fo:block font-family="monospace"
  121. white-space-collapse="false"
  122. linefeed-treatment="preserve"
  123. white-space-treatment="preserve"
  124. wrap-option="no-wrap">
  125. <![CDATA[<?xml version="1.0"?>
  126. <document>
  127. <heading>This is a heading</heading>
  128. <list>
  129. <item>Item one</item>
  130. <item>Item two</item>
  131. </list>
  132. </document>]]>
  133. </fo:block>
  134. <fo:block break-before="page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Embedded SVG</fo:block>
  135. <fo:block><fo:instream-foreign-object>
  136. <svg:svg width="400pt" height="200pt">
  137. <svg:rect style="fill:none;stroke:blue" x="20pt" y="20pt" width="100pt" height="100pt"/>
  138. <svg:line x1="20pt" y1="20pt" x2="120pt" y2="120pt"/>
  139. <svg:line x1="120pt" y1="20pt" x2="20pt" y2="120pt"/>
  140. <svg:text x="20pt" y="150pt">Hello SVG!</svg:text>
  141. </svg:svg>
  142. </fo:instream-foreign-object></fo:block>
  143. <fo:block>The above is an example of an SVG graphic</fo:block>
  144. </fo:flow>
  145. </fo:page-sequence>
  146. </fo:root>