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.

upgrading.xml 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
  18. <document>
  19. <header>
  20. <title>Upgrading from an Earlier Version of Apache™ FOP</title>
  21. <version>$Revision$</version>
  22. </header>
  23. <body>
  24. <section id="fop-1.0">
  25. <title>Upgrading from Version 1.0</title>
  26. <p>
  27. You should encounter very few issues in upgrading from FOP 1.0, except as noted in the following:
  28. </p>
  29. <ul>
  30. <li>
  31. The intermediate format (IF) output format has underwent minor modification as follows:
  32. <ul>
  33. <li>
  34. In order to track changes to the IF format, a <code>version</code> attribute has been added to the root
  35. <code>document</code> element. Since no version information was provided previously, the initial
  36. value of this attribute is <code>2.0</code>. Future backward compatible changes will update the minor
  37. version number, while future non-backward compatible changes will update the major version number.
  38. </li>
  39. <li>
  40. On the <code>text</code> element, a new alternate representation is used for adjustments to glyph positions as expressed by a <code>dp</code>
  41. attribute instead of the <code>dx</code> attribute. For further information, see
  42. <a href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/201202.mbox/%3cCACQ=j+evStXx=7hW=CHVNKCrZHUso9FHZCSk_5EoENOHcGpGOg@mail.gmail.com%3e">complex
  43. script patch - intermediate format changes</a>.
  44. </li>
  45. <li>
  46. On the <code>border-rect</code> element, the attributes {<code>before</code>, <code>after</code>, <code>start</code>, <code>end</code>}
  47. have been renamed to {<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code>}, respectively.
  48. For further information, see
  49. <a href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/201202.mbox/%3cCACQ=j+evStXx=7hW=CHVNKCrZHUso9FHZCSk_5EoENOHcGpGOg@mail.gmail.com%3e">complex
  50. script patch - intermediate format changes</a>.
  51. </li>
  52. </ul>
  53. </li>
  54. <li>
  55. The <code>IFPainter</code> interface (of package <code>org.apache.fop.render.intermediate</code>), specifically the
  56. <code>drawText</code> and <code>drawBorderRect</code> method signatures, have been modified to express the semantics of the above changes to the IF output format.
  57. </li>
  58. <li>
  59. The area tree (AT) output format has underwent minor modification as follows:
  60. <ul>
  61. <li>
  62. In order to track changes to the AT format, a <code>version</code> attribute has been added to the root
  63. <code>areaTree</code> element. Since no version information was provided previously, the initial
  64. value of this attribute is <code>2.0</code>. Future backward compatible changes will update the minor
  65. version number, while future non-backward compatible changes will update the major version number.
  66. </li>
  67. <li>
  68. An optional <code>level</code> attribute has been added to a number of element types to express resolved bidirectional level.
  69. </li>
  70. <li>
  71. An optional <code>reversed</code> attribute has been added to the <code>word</code> element type to express that the glyphs that
  72. correspond to the character content of the element should be reversed (in order) in the inline progression dimension when rendering.
  73. </li>
  74. </ul>
  75. </li>
  76. <li>
  77. Because complex script features are now enabled by default, it is possible that different font specific data will be used for
  78. kerning than was previously used. This may be the case if a font supports a traditional TrueType <code>kern</code> table and
  79. also supports the advanced typographic <code>kern</code> feature with a <code>GPOS</code> table. In FOP 1.0, the former is used for kerning,
  80. while in FOP 1.1 with complex script features enabled, the latter is used. If it is desired to explicitly use the <code>kern</code> table (rather
  81. than the <code>GPOS</code> table) in such a case, then the <code>-nocs</code> command line option may be used when invoking FOP
  82. in order to disable complex script features.
  83. </li>
  84. </ul>
  85. </section>
  86. <section id="pre-1.0">
  87. <title>Upgrading from Pre-1.0 Versions</title>
  88. <p>
  89. If you're planning to upgrade to the latest Apache™ FOP version from a pre-1.0 version,
  90. there are a few very important things to consider:
  91. </p>
  92. <ul>
  93. <li>
  94. The API of FOP has changed considerably and is not
  95. backwards-compatible with versions 0.20.5 and
  96. 0.91beta. Version 0.92 introduced the <strong>new stable
  97. API</strong>.
  98. </li>
  99. <li>
  100. Since version 0.92 some deprecated methods which were part
  101. of the old API have been removed. If you upgrade from 0.91
  102. beta, you will need to adjust your Java code. Similarly if
  103. you upgrade from 0.92 and use deprecated methods.
  104. </li>
  105. <li>
  106. If you are using a configuration file for version 0.20.5, you have to rebuild it in the new format. The format
  107. of the configuration files has changed since version 0.20.5. See conf/fop.xconf for
  108. an example configuration file. A XML Schema file can be found under
  109. src/foschema/fop-configuration.xsd.
  110. </li>
  111. <li>
  112. Beginning with version 0.94 you can skip the generation of
  113. font metric files and remove the "font-metrics" attribute
  114. in the font configuration. In the unlikely case that due to
  115. a bug you still need to use font metrics files you will need
  116. to regenerate the font metrics file if yours are from a FOP
  117. version before 0.93.
  118. </li>
  119. <li>
  120. <p>
  121. The new code is much more strict about the interpretation of the XSL-FO specification.
  122. Things that worked fine in version 0.20.5 might start to produce warnings or even errors
  123. now. FOP 0.20.5 contains many bugs which have been corrected in the new code.
  124. </p>
  125. <note label="An example">
  126. While FOP 0.20.5 allowed you to have empty <code>fo:table-cell</code> elements, the new code
  127. will complain about that (unless relaxed validation is enabled) because the specification
  128. demands at least one block-level element (<code>(%block;)+</code>, see
  129. <a href="http://www.w3.org/TR/xsl/#fo_table-cell">XSL-FO 1.1, 6.7.10</a>)
  130. inside an <code>fo:table-cell</code> element.
  131. </note>
  132. </li>
  133. <li>
  134. Extensions and Renderers written for version 0.20.5 will not work with the new code! The new FOP
  135. extension for <a href="http://barcode4j.sourceforge.net">Barcode4J</a> is available since
  136. January 2007.
  137. </li>
  138. <li>
  139. The SVG Renderer and the MIF Handler have not yet been resurrected! They are currently non-functional
  140. and hope for someone to step up and reimplement them.
  141. </li>
  142. </ul>
  143. <p>
  144. When you use your existing FO files or XML/XSL files which work fine with FOP version
  145. 0.20.5 against this FOP version some things may not work as expected. The following
  146. list will hopefully help you to identify and correct those problems.
  147. </p>
  148. <ul>
  149. <li>
  150. Check the <a href="../compliance.html">Compliance page</a> for the feature causing
  151. trouble. It may contain the necessary information to understand and resolve the problem.
  152. </li>
  153. <li>
  154. Not all 0.20.5 output formats are supported. PDF and Postscript should be fully supported.
  155. See <a href="output.html">Output Targets</a> for a more complete description.
  156. </li>
  157. <li>
  158. As stated above, empty table cells <code>&lt;fo:table-cell&gt;&lt;/fo:table-cell&gt;</code>
  159. are not allowed by the specification. The same applies to empty <code>fo:static-content</code>
  160. and <code>fo:block-container</code> elements, for example.
  161. </li>
  162. <li>
  163. Version 0.20.5 is not XSL-FO compliant with respect to sizing images (<code>external-graphic</code>)
  164. or <code>instream-foreign-object</code>
  165. objects. If images or SVGs are sized differently in your outputs with the new FOP version
  166. check <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37136">Bug 37136</a>
  167. as it contains some hints on what to do. The file
  168. <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/fo/basic/images.fo?view=markup">
  169. <code>"examples/fo/basic/images.fo"</code></a> has
  170. a number of good examples that show the correct behaviour.
  171. </li>
  172. <li>
  173. The <code>fox:outline</code> extension is not implemented in the current version:
  174. it has been superseded by the new bookmark elements from XSL-FO 1.1.
  175. </li>
  176. </ul>
  177. </section>
  178. </body>
  179. </document>