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.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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 last three years. With version 0.93 the code has reached <strong>production level</strong>, and
  33. the tradition continues with version 0.94.
  34. </li>
  35. <li>
  36. The API of FOP has changed considerably and is not
  37. backwards-compatible with versions 0.20.5 and
  38. 0.91beta. Version 0.92 introduced the <strong>new stable
  39. API</strong>.
  40. </li>
  41. <li>
  42. Since version 0.92 some deprecated methods which were part
  43. of the old API have been removed. If you upgrade from 0.91
  44. beta, you will need to adjust your Java code. Similarly if
  45. you upgrade from 0.92 and use deprecated methods.
  46. </li>
  47. <li>
  48. If you are using a configuration file for version 0.20.5, you have to rebuild it in the new format. The format
  49. of the configuration files has changed since version 0.20.5. See <code>conf/fop.xconf</code> for
  50. an example configuration file. A XML Schema file can be found under
  51. <code>src/foschema/fop-configuration.xsd</code>.
  52. </li>
  53. <li>
  54. If you are using font metrics files for version 0.20.5 or
  55. 0.92 or earlier, you have to regenerate them in the new
  56. format. The new format is characterized by a version
  57. attribute on the top-level font-metrics element, whose value
  58. is 2.0. The absence of a version attribute will be
  59. interpreted as version 1.0, and such metrics files will no
  60. longer be parsed.
  61. </li>
  62. <li>
  63. <p>
  64. The new code is much more strict about the interpretation of the XSL-FO 1.1 specification.
  65. Things that worked fine in version 0.20.5 might start to produce warnings or even errors
  66. now. FOP 0.20.5 contains many bugs which have been corrected in the new code.
  67. </p>
  68. <note label="An example">
  69. While FOP 0.20.5 allowed you to have empty <code>fo:table-cell</code> elements, the new code
  70. will complain about that (unless <a href="/0.94/running.html#fop-script">relaxed validation is enabled</a> via the <code>-r</code> switch via the command line) because the specification
  71. demands at least one block-level element (<code>(%block;)+</code>, see
  72. <a href="http://www.w3.org/TR/xsl/#fo_table-cell">XSL-FO 1.1, 6.7.10</a>)
  73. inside an <code>fo:table-cell</code> element.
  74. </note>
  75. </li>
  76. <li>
  77. Extensions and Renderers written for version 0.20.5 will not work with the new code! The new FOP
  78. extension for <a href="http://barcode4j.sourceforge.net">Barcode4J</a> is available since
  79. January 2007.
  80. </li>
  81. <li>
  82. The SVG Renderer and the MIF Handler have not been resurrected, yet! They are currently non-functional
  83. and hope for someone to step up and reimplement them.
  84. </li>
  85. </ul>
  86. </section>
  87. <section id="issues">
  88. <title>What you need to know when you upgrade!</title>
  89. <p>
  90. When you use your existing FO files or XML/XSL files which work fine with FOP version
  91. 0.20.5 against this FOP version some things may not work as expected. The following
  92. list will hopefully help you to identify and correct those problems.
  93. </p>
  94. <ul>
  95. <li>
  96. Check the <a href="../compliance.html">Compliance page</a> for the feature causing
  97. trouble. It may contain the necessary information to understand and resolve the problem.
  98. </li>
  99. <li>
  100. Not all 0.20.5 output formats are supported. PDF and Postscript should be fully supported.
  101. See <a href="output.html">Output Targets</a> for a more complete description.
  102. </li>
  103. <li>
  104. As stated above empty table cells <code>&lt;fo:table-cell&gt;&lt;/fo:table-cell&gt;</code>
  105. are not allowed by the specification. The same applies to empty <code>static-content</code>
  106. and <code>block-container</code> elements, for example.
  107. </li>
  108. <li>
  109. 0.20.5 is not XSL-FO compliant with respect to sizing images (<code>external-graphic</code>)
  110. or <code>instream-foreign-object</code>
  111. objects. If images or SVGs are sized differently in your outputs with the new FOP version
  112. check <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37136">Bug 37136</a>
  113. as it contains some hints on what to do. The file
  114. <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/fo/basic/images.fo?view=markup">
  115. <code>"examples/fo/basic/images.fo"</code></a> has
  116. a number of good examples that show the new, more correct behaviour.
  117. </li>
  118. <li>
  119. The <code>fox:outline</code> extension is not implemented in this version anymore.
  120. It has been superseded by the new bookmark elements from XSL-FO 1.1.
  121. </li>
  122. <li>
  123. The <code>fox:destination</code> extension is also not implemented in this version
  124. although it may be added in the future. See also
  125. <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37157">Bug 37157</a>.
  126. </li>
  127. </ul>
  128. </section>
  129. </body>
  130. </document>