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 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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="important">
  25. <title>Important!</title>
  26. <p>
  27. If you're planning to upgrade to the latest FOP version there are a few very important things
  28. to consider:
  29. </p>
  30. <ul>
  31. <li>
  32. More than half of the codebase has been rewritten over the
  33. last four years. With version 0.93 the code has reached
  34. <strong>production level</strong>, and continues to improve with
  35. version 0.94 and 0.95.
  36. </li>
  37. <li>
  38. The API of FOP has changed considerably and is not
  39. backwards-compatible with versions 0.20.5 and
  40. 0.91beta. Version 0.92 introduced the <strong>new stable
  41. API</strong>.
  42. </li>
  43. <li>
  44. Since version 0.92 some deprecated methods which were part
  45. of the old API have been removed. If you upgrade from 0.91
  46. beta, you will need to adjust your Java code. Similarly if
  47. you upgrade from 0.92 and use deprecated methods.
  48. </li>
  49. <li>
  50. If you are using a configuration file for version 0.20.5, you have to rebuild it in the new format. The format
  51. of the configuration files has changed since version 0.20.5. See conf/fop.xconf for
  52. an example configuration file. A XML Schema file can be found under
  53. src/foschema/fop-configuration.xsd.
  54. </li>
  55. <li>
  56. Beginning with version 0.94 you can skip the generation of
  57. font metric files and remove the "font-metrics" attribute
  58. in the font configuration. The font metrics files are, for
  59. the moment, still required if you use a TrueType Collection (*.ttc)
  60. and in that case you need to regenerate the font metrics file
  61. if yours are from a FOP version before 0.93.
  62. </li>
  63. <li>
  64. <p>
  65. The new code is much more strict about the interpretation of the XSL-FO 1.0 specification.
  66. Things that worked fine in version 0.20.5 might start to produce warnings or even errors
  67. now. FOP 0.20.5 contains many bugs which have been corrected in the new code.
  68. </p>
  69. <note label="An example">
  70. While FOP 0.20.5 allowed you to have empty <code>fo:table-cell</code> elements, the new code
  71. will complain about that (unless relaxed validation is enabled) because the specification
  72. demands at least one block-level element (<code>(%block;)+</code>, see
  73. <a href="http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_table-cell">XSL-FO 1.0, 6.7.10</a>)
  74. inside an <code>fo:table-cell</code> element.
  75. </note>
  76. </li>
  77. <li>
  78. Extensions and Renderers written for version 0.20.5 will not work with the new code! The new FOP
  79. extension for <a href="http://barcode4j.krysalis.org">Barcode4J</a> is available since
  80. January 2007.
  81. </li>
  82. <li>
  83. The SVG Renderer and the MIF Handler have not been resurrected, yet! They are currently non-functional
  84. and hope for someone to step up and reimplement them.
  85. </li>
  86. </ul>
  87. </section>
  88. <section id="issues">
  89. <title>What you need to know when you upgrade!</title>
  90. <p>
  91. When you use your existing FO files or XML/XSL files which work fine with FOP version
  92. 0.20.5 against this FOP version some things may not work as expected. The following
  93. list will hopefully help you to identify and correct those problems. This does not mean
  94. that the new FOP is at fault. Quite the opposite actually! See below:
  95. </p>
  96. <ul>
  97. <li>
  98. Check the <a href="../compliance.html">Compliance page</a> for the feature causing
  99. trouble. It may contain the necessary information to understand and resolve the problem.
  100. </li>
  101. <li>
  102. As stated above empty table cells <code>&lt;fo:table-cell&gt;&lt;/fo:table-cell&gt;</code>
  103. are not allowed by the specification. The same applies to empty <code>static-content</code>
  104. and <code>block-container</code> elements, for example.
  105. </li>
  106. <li>
  107. 0.20.5 is not XSL-FO compliant with respect to sizing images (<code>external-graphic</code>)
  108. or <code>instream-foreign-object</code>
  109. objects. If images or SVGs are sized differently in your outputs with the new FOP version
  110. check <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37136">Bug 37136</a>
  111. as it contains some hints on what to do. The file
  112. <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/fo/basic/images.fo?view=markup">
  113. <code>"examples/fo/basic/images.fo"</code></a> has
  114. a number of good examples that show the new, more correct behaviour.
  115. </li>
  116. <li>
  117. The <code>fox:outline</code> extension is not implemented in this version anymore.
  118. It has been superseded by the new bookmark elements from XSL-FO 1.1. So please
  119. update your stylesheets accordingly.
  120. </li>
  121. </ul>
  122. </section>
  123. </body>
  124. </document>