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.

basic2.fo 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- This example shows the simplest use of an fo:page-sequence-master (PSM),
  3. having only a single fo:simple-page-master-reference.
  4. Note that because only a single fo:simple-page-master-reference is being
  5. used, this PSM can actually be omitted. Instead, the fo:page-sequence's
  6. master-reference can be set directly to the master-name attribute
  7. ("SPM_Name") of the fo:simple-page-master (SPM).
  8. Also note that using a single fo:single-page-master-reference (as opposed
  9. to a fo:repeatable-page-master-reference) within the PSM limits you
  10. to one (1) page for the referencing fo:page-sequence. If the fo:page-sequence's
  11. master-reference is set to the master-name of the SPM, however, the number
  12. of pages that can be output using that SPM is unbounded.
  13. -->
  14. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  15. <!-- defines page layout -->
  16. <fo:layout-master-set>
  17. <!-- layout for the first page -->
  18. <fo:simple-page-master master-name="SPM_Name"
  19. page-height="29.7cm"
  20. page-width="21cm"
  21. margin-top="1cm"
  22. margin-bottom="2cm"
  23. margin-left="2.5cm"
  24. margin-right="2.5cm">
  25. <fo:region-body margin-top="3cm"/>
  26. <fo:region-before extent="3cm"/>
  27. <fo:region-after extent="1.5cm"/>
  28. </fo:simple-page-master>
  29. <fo:page-sequence-master master-name="PSM_Name">
  30. <fo:single-page-master-reference master-reference="SPM_Name"/>
  31. </fo:page-sequence-master>
  32. </fo:layout-master-set>
  33. <!-- end: defines page layout -->
  34. <!-- actual layout, note master-reference can alternatively be set to
  35. SPM_Name as mentioned above -->
  36. <fo:page-sequence master-reference="PSM_Name" initial-page-number="1">
  37. <!-- usage of page layout -->
  38. <!-- header -->
  39. <fo:static-content flow-name="xsl-region-before">
  40. <fo:block text-align="end"
  41. font-size="10pt"
  42. font-family="serif"
  43. line-height="14pt">
  44. XML Recommendation - p. <fo:page-number/>
  45. </fo:block>
  46. </fo:static-content>
  47. <fo:flow flow-name="xsl-region-body">
  48. <!-- defines text title level 1-->
  49. <fo:block font-size="18pt"
  50. font-family="sans-serif"
  51. line-height="24pt"
  52. space-after.optimum="15pt"
  53. background-color="blue"
  54. color="white"
  55. text-align="center"
  56. padding-top="0pt">
  57. Extensible Markup Language (XML) 1.0
  58. </fo:block>
  59. <!-- defines text title level 2-->
  60. <fo:block font-size="16pt"
  61. font-family="sans-serif"
  62. line-height="20pt"
  63. space-before.optimum="10pt"
  64. space-after.optimum="10pt"
  65. text-align="start"
  66. padding-top="0pt">
  67. Abstract
  68. </fo:block>
  69. <!-- Normal text -->
  70. <fo:block font-size="12pt"
  71. font-family="sans-serif"
  72. line-height="15pt"
  73. space-after.optimum="3pt"
  74. text-align="start">
  75. The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to
  76. enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML
  77. has been designed for ease of implementation and for interoperability with both SGML and HTML. For further information
  78. go to <fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>
  79. </fo:block>
  80. <!-- defines text title level 2-->
  81. <fo:block font-size="16pt"
  82. font-family="sans-serif"
  83. line-height="20pt"
  84. space-before.optimum="10pt"
  85. space-after.optimum="10pt"
  86. text-align="start"
  87. padding-top="0pt">
  88. Status of this document
  89. </fo:block>
  90. <!-- Normal text -->
  91. <fo:block font-size="12pt"
  92. font-family="sans-serif"
  93. line-height="15pt"
  94. space-after.optimum="3pt"
  95. text-align="start">
  96. This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a
  97. W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from
  98. another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its
  99. widespread deployment. This enhances the functionality and interoperability of the Web. For further information go to
  100. <fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>
  101. </fo:block>
  102. <!-- Normal text -->
  103. <fo:block font-size="12pt"
  104. font-family="sans-serif"
  105. line-height="15pt"
  106. space-after.optimum="3pt"
  107. text-align="start">
  108. This document specifies a syntax created by subsetting an existing, widely used international text processing standard
  109. (Standard Generalized Markup Language, ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web. It
  110. is a product of the W3C XML Activity, details of which can be found at http://www.w3.org/XML. A list of current W3C
  111. Recommendations and other technical documents can be found at http://www.w3.org/TR.
  112. </fo:block>
  113. </fo:flow>
  114. </fo:page-sequence>
  115. </fo:root>