You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/08/26 11:10:32 UTC

svn commit: r689005 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ lib/ lib/build/ src/documentation/content/ src/documentation/content/xdocs/ src/documentation/content/xdocs/0.95/ src/documentation/content/xdocs/trunk/ src/java/org/apache/fo...

Author: acumiskey
Date: Tue Aug 26 02:10:19 2008
New Revision: 689005

URL: http://svn.apache.org/viewvc?rev=689005&view=rev
Log:
Merged revisions 687576,687657,687786,688078,688087,688139,688508,688633,688652-688653,688660,688664,688666,688674,688698,688994,689000 via svnmerge from 
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk

........
  r687576 | maxberger | 2008-08-21 07:25:40 +0100 (Thu, 21 Aug 2008) | 1 line
  
  Included patched retroweaver which does not modify Boolean.valueOf
........
  r687657 | jeremias | 2008-08-21 09:51:50 +0100 (Thu, 21 Aug 2008) | 1 line
  
  Added an FAQ entry about the element mismatch error message.
........
  r687786 | jeremias | 2008-08-21 16:49:13 +0100 (Thu, 21 Aug 2008) | 1 line
  
  Added some performance statistics to MemoryEater.
........
  r688078 | jeremias | 2008-08-22 14:02:37 +0100 (Fri, 22 Aug 2008) | 1 line
  
  Final statistics output after the test with average speed indication.
........
  r688087 | jeremias | 2008-08-22 15:16:58 +0100 (Fri, 22 Aug 2008) | 2 lines
  
  Merge from branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95:
  Fixed text stroking in SVG when the stroke-width is zero.
........
  r688139 | maxberger | 2008-08-22 19:08:36 +0100 (Fri, 22 Aug 2008) | 1 line
  
  minor spelling mistakes
........
  r688508 | maxberger | 2008-08-24 14:12:02 +0100 (Sun, 24 Aug 2008) | 2 lines
  
  Moved DataURIResolver from FOP to commons; use new URIResolver registry
........
  r688633 | jeremias | 2008-08-25 07:42:44 +0100 (Mon, 25 Aug 2008) | 2 lines
  
  Fixed memory leak in property cache (not cleaning stale PropertyCache$CacheEntry instances).
  Special thanks to Andreas Delmelle for his help!
........
  r688652 | maxberger | 2008-08-25 09:19:13 +0100 (Mon, 25 Aug 2008) | 1 line
  
  Re-added moved class as deprecated
........
  r688653 | jeremias | 2008-08-25 09:23:31 +0100 (Mon, 25 Aug 2008) | 1 line
  
  Added a page on metadata (partly ported from the FOP Wiki).
........
  r688660 | jeremias | 2008-08-25 09:41:29 +0100 (Mon, 25 Aug 2008) | 2 lines
  
  Fixed example.
  Thanks for noticing, Pascal Sancho!
........
  r688664 | jeremias | 2008-08-25 09:59:27 +0100 (Mon, 25 Aug 2008) | 1 line
  
  Minor documentation improvements, most notably a comment about keep-together="always".
........
  r688666 | maxberger | 2008-08-25 10:00:27 +0100 (Mon, 25 Aug 2008) | 1 line
  
  CommonURIResolver is no longer a singleton
........
  r688674 | jeremias | 2008-08-25 10:15:22 +0100 (Mon, 25 Aug 2008) | 1 line
  
  Hmm, I missed the redirects for the 0.95 release.
........
  r688698 | jeremias | 2008-08-25 12:24:15 +0100 (Mon, 25 Aug 2008) | 2 lines
  
  Merge from 0.95 branch:
  Fixed jar-sources target.
........
  r688994 | acumiskey | 2008-08-26 09:34:45 +0100 (Tue, 26 Aug 2008) | 1 line
  
  Deprecate UnitConv now that it resides only in xmlgraphics commons.
........
  r689000 | acumiskey | 2008-08-26 09:59:31 +0100 (Tue, 26 Aug 2008) | 1 line
  
  Forgot to add deprecated public statics.
........

Added:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/build/retroweaver-2.0.6-patched.jar
      - copied unchanged from r689000, xmlgraphics/fop/trunk/lib/build/retroweaver-2.0.6-patched.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/build/retroweaver-rt-2.0.6-patched.jar
      - copied unchanged from r689000, xmlgraphics/fop/trunk/lib/build/retroweaver-rt-2.0.6-patched.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/0.95/metadata.xml
      - copied unchanged from r689000, xmlgraphics/fop/trunk/src/documentation/content/xdocs/0.95/metadata.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/metadata.xml
      - copied unchanged from r689000, xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/metadata.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/DataURIResolver.java
      - copied unchanged from r689000, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DataURIResolver.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/DataURLUtil.java
      - copied unchanged from r689000, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DataURLUtil.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/UnitConv.java
      - copied unchanged from r689000, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/WriterOutputStream.java
      - copied unchanged from r689000, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/WriterOutputStream.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/memory/Stats.java
      - copied unchanged from r689000, xmlgraphics/fop/trunk/test/java/org/apache/fop/memory/Stats.java
Removed:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/build/retroweaver-2.0.5.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/build/retroweaver-rt-2.0.5.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/util/DataURIResolverTestCase.java
Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/   (props changed)
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xmlgraphics-commons-1.4svn.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/.htaccess
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/0.95/pdfa.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/faq.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/site.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/pdfa.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/apps/FOURIResolver.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/PropertyCache.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFTextPainter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/UtilityCodeTestSuite.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/memory/MemoryEater.java

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 26 02:10:19 2008
@@ -1 +1 @@
-/xmlgraphics/fop/branches/fop-0_95:684572
+/xmlgraphics/fop/branches/fop-0_95:684572,688085,688696

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 26 02:10:19 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-687370
+/xmlgraphics/fop/trunk:1-689001

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml Tue Aug 26 02:10:19 2008
@@ -474,7 +474,6 @@
       <pathelement location="${java14.jce.lib}"/>
       <pathelement location="${ant.home}/lib/ant.jar"/>
       <path refid="libs-build-classpath"/>
-      <path refid="libs-build-tools-classpath"/>
     </path>
     <!-- If we decide to use retroweaver for the actual weaving, the mkdir and
          destdir= will have to be removed. Also, the weaving task would additionally
@@ -555,9 +554,6 @@
       <fileset dir="${src.java.dir}">
         <patternset refid="java-only"/>
       </fileset>
-      <fileset dir="${src.java.version.dir}">
-        <patternset refid="java-only"/>
-      </fileset>
       <fileset dir="${basedir}">
         <include name="LICENSE"/>
         <include name="NOTICE"/>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xmlgraphics-commons-1.4svn.jar
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xmlgraphics-commons-1.4svn.jar?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/.htaccess
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/.htaccess?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/.htaccess (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/.htaccess Tue Aug 26 02:10:19 2008
@@ -1,28 +1,38 @@
 # redirect moved files
-RedirectMatch Permanent ^/fop/anttask(.*) http://xmlgraphics.apache.org/fop/0.94/anttask$1
-RedirectMatch Permanent ^/fop/compiling(.*) http://xmlgraphics.apache.org/fop/0.94/compiling$1
-RedirectMatch Permanent ^/fop/configuration(.*) http://xmlgraphics.apache.org/fop/0.94/configuration$1
-RedirectMatch Permanent ^/fop/embedding(.*) http://xmlgraphics.apache.org/fop/0.94/embedding$1
-RedirectMatch Permanent ^/fop/extensions(.*) http://xmlgraphics.apache.org/fop/0.94/extensions$1
-RedirectMatch Permanent ^/fop/fonts(.*) http://xmlgraphics.apache.org/fop/0.94/fonts$1
-RedirectMatch Permanent ^/fop/graphics(.*) http://xmlgraphics.apache.org/fop/0.94/graphics$1
-RedirectMatch Permanent ^/fop/hyphenation(.*) http://xmlgraphics.apache.org/fop/0.94/hyphenation$1
-RedirectMatch Permanent ^/fop/intermediate(.*) http://xmlgraphics.apache.org/fop/0.94/intermediate$1
-RedirectMatch Permanent ^/fop/output(.*) http://xmlgraphics.apache.org/fop/0.94/output$1
-RedirectMatch Permanent ^/fop/pdfa(.*) http://xmlgraphics.apache.org/fop/0.94/pdfa$1
-RedirectMatch Permanent ^/fop/pdfencryption(.*) http://xmlgraphics.apache.org/fop/0.94/pdfencryption$1
-RedirectMatch Permanent ^/fop/pdfx(.*) http://xmlgraphics.apache.org/fop/0.94/pdfx$1
-RedirectMatch Permanent ^/fop/running(.*) http://xmlgraphics.apache.org/fop/0.94/running$1
-RedirectMatch Permanent ^/fop/servlets(.*) http://xmlgraphics.apache.org/fop/0.94/servlets$1
-RedirectMatch Permanent ^/fop/upgrading(.*) http://xmlgraphics.apache.org/fop/0.94/upgrading$1
+RedirectMatch Permanent ^/fop/anttask(.*) http://xmlgraphics.apache.org/fop/0.95/anttask$1
+RedirectMatch Permanent ^/fop/compiling(.*) http://xmlgraphics.apache.org/fop/0.95/compiling$1
+RedirectMatch Permanent ^/fop/configuration(.*) http://xmlgraphics.apache.org/fop/0.95/configuration$1
+RedirectMatch Permanent ^/fop/embedding(.*) http://xmlgraphics.apache.org/fop/0.95/embedding$1
+RedirectMatch Permanent ^/fop/extensions(.*) http://xmlgraphics.apache.org/fop/0.95/extensions$1
+RedirectMatch Permanent ^/fop/fonts(.*) http://xmlgraphics.apache.org/fop/0.95/fonts$1
+RedirectMatch Permanent ^/fop/graphics(.*) http://xmlgraphics.apache.org/fop/0.95/graphics$1
+RedirectMatch Permanent ^/fop/hyphenation(.*) http://xmlgraphics.apache.org/fop/0.95/hyphenation$1
+RedirectMatch Permanent ^/fop/intermediate(.*) http://xmlgraphics.apache.org/fop/0.95/intermediate$1
+RedirectMatch Permanent ^/fop/output(.*) http://xmlgraphics.apache.org/fop/0.95/output$1
+RedirectMatch Permanent ^/fop/pdfa(.*) http://xmlgraphics.apache.org/fop/0.95/pdfa$1
+RedirectMatch Permanent ^/fop/pdfencryption(.*) http://xmlgraphics.apache.org/fop/0.95/pdfencryption$1
+RedirectMatch Permanent ^/fop/pdfx(.*) http://xmlgraphics.apache.org/fop/0.95/pdfx$1
+RedirectMatch Permanent ^/fop/running(.*) http://xmlgraphics.apache.org/fop/0.95/running$1
+RedirectMatch Permanent ^/fop/servlets(.*) http://xmlgraphics.apache.org/fop/0.95/servlets$1
+RedirectMatch Permanent ^/fop/upgrading(.*) http://xmlgraphics.apache.org/fop/0.95/upgrading$1
 
 # redirect to versioned documentation
-Redirect Temp /fop/stable http://xmlgraphics.apache.org/fop/0.94
+# Current stable release
+Redirect Temp /fop/stable http://xmlgraphics.apache.org/fop/0.95
+
+# Current unstable release (or trunk if no beta is the latest release)
+Redirect Temp /fop/unstable http://xmlgraphics.apache.org/fop/trunk
+
+# Latest release
 Redirect Temp /fop/current http://xmlgraphics.apache.org/fop/0.95
-Redirect Temp /fop/unstable http://xmlgraphics.apache.org/fop/0.95
-Redirect Temp /fop/latest http://xmlgraphics.apache.org/fop/trunk
-Redirect Temp /fop/maintenance http://xmlgraphics.apache.org/fop/0.93
-Redirect Temp /fop/previous http://xmlgraphics.apache.org/fop/0.93
-Redirect Temp /fop/0.90alpha1 http://xmlgraphics.apache.org/fop/0.93
-Redirect Temp /fop/0.91beta http://xmlgraphics.apache.org/fop/0.93
-Redirect Temp /fop/0.92beta http://xmlgraphics.apache.org/fop/0.93
+Redirect Temp /fop/latest http://xmlgraphics.apache.org/fop/0.95
+
+# Previous stable release
+Redirect Temp /fop/previous http://xmlgraphics.apache.org/fop/0.94
+
+# Old releases
+Redirect Temp /fop/maintenance http://xmlgraphics.apache.org/fop/0.94
+Redirect Temp /fop/0.90alpha1 http://xmlgraphics.apache.org/fop/0.94
+Redirect Temp /fop/0.91beta http://xmlgraphics.apache.org/fop/0.94
+Redirect Temp /fop/0.92beta http://xmlgraphics.apache.org/fop/0.94
+Redirect Temp /fop/0.93 http://xmlgraphics.apache.org/fop/0.94

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/0.95/pdfa.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/0.95/pdfa.xml?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/0.95/pdfa.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/0.95/pdfa.xml Tue Aug 26 02:10:19 2008
@@ -28,9 +28,6 @@
   <body>
     <section id="overview">
       <title>Overview</title>
-      <warning>
-        Support for PDF/A is available beginning with version 0.92.
-      </warning>
       <p>
         PDF/A is a standard which turns PDF into an "electronic document file 
         format for long-term preservation". PDF/A-1 is the first part of the 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/faq.xml?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/faq.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/faq.xml Tue Aug 26 02:10:19 2008
@@ -385,6 +385,47 @@
         </p>
       </answer>
     </faq>
+    <faq id="saxexception-mismatch">
+      <question>I get a SAXException: Mismatch: page-sequence vs. root
+        (or similar).</question>
+      <answer>
+        <p>
+          The full exception usually looks similar to this:
+        </p>
+        <source>Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root
+        (http://www.w3.org/1999/XSL/Format)</source>
+        <p>
+          This exception is usually a follow-up error after another exception. Sometimes
+          the original exception gets swallowed by Xalan's default <code>ErrorListener</code>
+          (should be fixed in the latest Xalan release).
+        </p>
+        <p>
+          The work-around is to set an explicit <code>ErrorListener</code> on the
+          <code>Transformer</code>. The <code>ErrorListener</code> can be as simple as this:
+        </p>
+        <source><![CDATA[
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.TransformerException;
+
+public class DefaultErrorListener implements ErrorListener {
+    
+    public void warning(TransformerException exc) {
+        System.err.println(exc.toString());
+    }
+
+    public void error(TransformerException exc)
+            throws TransformerException {
+        throw exc;
+    }
+
+    public void fatalError(TransformerException exc)
+            throws TransformerException {
+        throw exc;
+    }
+
+}]]></source>
+      </answer>
+    </faq>
   </part>
   <part id="part-output">
     <title>Problems with FOP output</title>
@@ -551,8 +592,10 @@
         text flows into adjacent cells/block, obscuring stuff there.</question>
       <answer>
         <p>
-          Clipping as specified by the <code>overflow="hidden"</code> is not yet
-          implemented.  If you have long words overflowing table cells, try to
+          Since the <code>overflow</code> property doesn't apply to table-cell, you
+          can wrap the cell content in a block-container and specify
+          <code>overflow="hidden"</code> there. Alternatively,
+          if you have long words overflowing table cells, try to
           get them hyphenated. Artificial names like product identifications or
           long numbers usually aren't hyphenated. You can try special processing
           at XSLT level, like
@@ -574,6 +617,15 @@
           <link href="http://www.mulberrytech.com/xsl/xsl-list/">XSL list
           archive</link> for how to perform these tasks.
         </p>
+        <p>
+          If your text is not hyphenated at all and overflows the cell, please check
+          if you've specified <code>keep-together="always"</code> on the table-cell
+          or one of its parent elements. <code>keep-together="always"</code> implicitely
+          also sets <code>keep-together.within-line="always"</code> which forbids FOP
+          to break the text into multiple lines. This is important as FOP supports inline-level
+          keeps since version 0.94. It's a good idea not to use the shorthand
+          <code>keep-together="always"</code> at all!
+        </p>
       </answer>
     </faq>
     <faq id="row-height-constraint">

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/site.xml?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/site.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/site.xml Tue Aug 26 02:10:19 2008
@@ -123,6 +123,7 @@
       <fonts label="Fonts" href="fonts.html"/>
       <hyphenation label="Hyphenation" href="hyphenation.html"/>    
       <extensions label="Extensions" href="extensions.html"/>
+      <metadata label="Metadata" href="metadata.html"/>
     </features>
     
   </trunk>
@@ -157,6 +158,7 @@
       <hyphenation label="Hyphenation" href="hyphenation.html"/>    
       <extensions label="Extensions" href="extensions.html"/>
       <events label="Events" href="events.html"/>
+      <metadata label="Metadata" href="metadata.html"/>
     </features>
     
   </trunk>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/pdfa.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/pdfa.xml?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/pdfa.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/pdfa.xml Tue Aug 26 02:10:19 2008
@@ -28,9 +28,6 @@
   <body>
     <section id="overview">
       <title>Overview</title>
-      <warning>
-        Support for PDF/A is available beginning with version 0.92.
-      </warning>
       <p>
         PDF/A is a standard which turns PDF into an "electronic document file 
         format for long-term preservation". PDF/A-1 is the first part of the 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/apps/FOURIResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/apps/FOURIResolver.java?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/apps/FOURIResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/apps/FOURIResolver.java Tue Aug 26 02:10:19 2008
@@ -34,14 +34,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.xmlgraphics.util.io.Base64EncodeStream;
-
-import org.apache.fop.util.DataURIResolver;
+import org.apache.xmlgraphics.util.uri.CommonURIResolver;
 
 /**
  * Provides FOP specific URI resolution. This is the default URIResolver
- * {@link FOUserAgent} will use unless overidden.
+ * {@link FOUserAgent} will use unless overridden.
  *
  * @see javax.xml.transform.URIResolver
  */
@@ -50,8 +48,8 @@
     // log
     private Log log = LogFactory.getLog("FOP");
 
-    /** URIResolver for RFC 2397 data URLs */
-    private URIResolver dataURIResolver = new DataURIResolver();
+    /** Common URIResolver */
+    private CommonURIResolver commonURIResolver = new CommonURIResolver();
 
     /** A user settable URI Resolver */
     private URIResolver uriResolver = null;
@@ -152,7 +150,7 @@
 
         // data URLs can be quite long so evaluate early and don't try to build a File
         // (can lead to problems)
-        source = dataURIResolver.resolve(href, base);
+        source = commonURIResolver.resolve(href, base);
 
         // Custom uri resolution
         if (source == null && uriResolver != null) {

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/PropertyCache.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/PropertyCache.java?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/PropertyCache.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/PropertyCache.java Tue Aug 26 02:10:19 2008
@@ -33,9 +33,12 @@
  */
 public final class PropertyCache {
 
+    private static final int SEGMENT_COUNT = 32; //0x20
+    private static final int INITIAL_BUCKET_COUNT = SEGMENT_COUNT;
+
     /** bitmask to apply to the hash to get to the
      *  corresponding cache segment */
-    private static final int SEGMENT_MASK = 0x1F;
+    private static final int SEGMENT_MASK = SEGMENT_COUNT - 1; //0x1F
     /**
      * Indicates whether the cache should be used at all
      * Can be controlled by the system property:
@@ -44,13 +47,13 @@
     private final boolean useCache;
 
     /** the segments array (length = 32) */
-    private CacheSegment[] segments = new CacheSegment[SEGMENT_MASK + 1];
+    private CacheSegment[] segments = new CacheSegment[SEGMENT_COUNT];
     /** the table of hash-buckets */
-    private CacheEntry[] table = new CacheEntry[8];
+    private CacheEntry[] table = new CacheEntry[INITIAL_BUCKET_COUNT];
 
     private Class runtimeType;
 
-    final boolean[] votesForRehash = new boolean[SEGMENT_MASK + 1];
+    private boolean[] votesForRehash = new boolean[SEGMENT_COUNT];
 
     /* same hash function as used by java.util.HashMap */
     private static int hash(Object x) {
@@ -72,53 +75,61 @@
     }
 
     /* Class modeling a cached entry */
-    private final class CacheEntry extends WeakReference {
-        volatile CacheEntry nextEntry;
-        final int hash;
+    private static class CacheEntry extends WeakReference {
+        private volatile CacheEntry nextEntry;
+        private final int hash;
 
         /* main constructor */
         public CacheEntry(Object p, CacheEntry nextEntry, ReferenceQueue refQueue) {
             super(p, refQueue);
             this.nextEntry = nextEntry;
-            this.hash = p.hashCode();
+            this.hash = hash(p);
+        }
+
+        /* main constructor */
+        public CacheEntry(Object p, CacheEntry nextEntry) {
+            super(p);
+            this.nextEntry = nextEntry;
+            this.hash = hash(p);
         }
 
     }
 
     /* Wrapper objects to synchronize on */
-    private final class CacheSegment {
+    private static class CacheSegment {
         private int count = 0;
-        private volatile ReferenceQueue staleEntries = new ReferenceQueue();
     }
 
     private void cleanSegment(int segmentIndex) {
-        CacheEntry entry;
         CacheSegment segment = segments[segmentIndex];
-        int bucketIndex;
+
         int oldCount = segment.count;
 
-        while ((entry = (CacheEntry) segment.staleEntries.poll()) != null) {
-            bucketIndex = hash(entry.hash) & (table.length - 1);
-            /* remove obsolete entry */
-            /* 1. move to the corresponding entry */
+        /* clean all buckets in this segment */
+        for (int bucketIndex = segmentIndex;
+                    bucketIndex < table.length;
+                    bucketIndex += SEGMENT_COUNT) {
             CacheEntry prev = null;
-            CacheEntry e = table[bucketIndex];
-            while (e != null
-                    && e.nextEntry != null
-                    && e.hash != entry.hash) {
-                prev = e;
-                e = e.nextEntry;
+            CacheEntry entry = table[bucketIndex];
+            if (entry == null) {
+                continue;
             }
-            if (e != null) {
-                /* 2. remove reference from the chain */
-                if (prev == null) {
-                    table[bucketIndex] = e.nextEntry;
+            do {
+                if (entry.get() == null) {
+                    if (prev == null) {
+                        table[bucketIndex] = entry.nextEntry;
+                    } else {
+                        prev.nextEntry = entry.nextEntry;
+                    }
+                    segment.count--;
+                    assert segment.count >= 0;
                 } else {
-                    prev.nextEntry = e.nextEntry;
+                    prev = entry;
                 }
-                segment.count--;
-            }
+                entry = entry.nextEntry;
+            } while (entry != null);
         }
+
         synchronized (votesForRehash) {
             if (oldCount > segment.count) {
                 votesForRehash[segmentIndex] = false;
@@ -129,7 +140,7 @@
                 /* first time for this segment */
                 votesForRehash[segmentIndex] = true;
                 int voteCount = 0;
-                for (int i = SEGMENT_MASK + 1; --i >= 0; ) {
+                for (int i = SEGMENT_MASK + 1; --i >= 0;) {
                     if (votesForRehash[i]) {
                         voteCount++;
                     }
@@ -156,14 +167,15 @@
     private void put(Object o) {
 
         int hash = hash(o);
-        CacheSegment segment = segments[hash & SEGMENT_MASK];
+        int segmentIndex = hash & SEGMENT_MASK;
+        CacheSegment segment = segments[segmentIndex];
 
         synchronized (segment) {
             int index = hash & (table.length - 1);
             CacheEntry entry = table[index];
 
             if (entry == null) {
-                entry = new CacheEntry(o, null, segment.staleEntries);
+                entry = new CacheEntry(o, null);
                 table[index] = entry;
                 segment.count++;
             } else {
@@ -171,14 +183,14 @@
                 if (eq(p, o)) {
                     return;
                 } else {
-                    CacheEntry newEntry = new CacheEntry(o, entry, segment.staleEntries);
+                    CacheEntry newEntry = new CacheEntry(o, entry);
                     table[index] = newEntry;
                     segment.count++;
                 }
             }
 
             if (segment.count > (2 * table.length)) {
-                cleanSegment(hash & SEGMENT_MASK);
+                  cleanSegment(segmentIndex);
             }
         }
     }
@@ -195,7 +207,7 @@
 
         /* try non-synched first */
         for (CacheEntry e = entry; e != null; e = e.nextEntry) {
-            if (e.hash == o.hashCode()
+            if (e.hash == hash
                     && (q = e.get()) != null
                     &&  eq(q, o)) {
                 return q;
@@ -209,7 +221,7 @@
         synchronized (segment) {
             entry = table[index];
             for (CacheEntry e = entry; e != null; e = e.nextEntry) {
-                if (e.hash == o.hashCode()
+                if (e.hash == hash
                         && (q = e.get()) != null
                         &&  eq(q, o)) {
                     return q;
@@ -235,7 +247,7 @@
                 /* double the amount of buckets */
                 int newLength = table.length << 1;
                 if (newLength > 0) { //no overflow?
-                    /* reset segmentcounts */
+                    /* reset segment counts */
                     for (int i = segments.length; --i >= 0;) {
                         segments[i].count = 0;
                     }
@@ -250,8 +262,7 @@
                             if ((o = c.get()) != null) {
                                 hash = c.hash;
                                 idx = hash & newLength;
-                                newTable[idx] = new CacheEntry(o, newTable[idx],
-                                        segments[hash & SEGMENT_MASK].staleEntries);
+                                newTable[idx] = new CacheEntry(o, newTable[idx]);
                                 segments[hash & SEGMENT_MASK].count++;
                             }
                         }
@@ -313,7 +324,7 @@
      *  @param prop the Property instance to check for
      *  @return the cached instance
      */
-    public final Property fetch(Property prop) {
+    public Property fetch(Property prop) {
 
         return (Property) fetch((Object) prop);
     }
@@ -326,7 +337,7 @@
      *  @param chy the CommonHyphenation instance to check for
      *  @return the cached instance
      */
-    public final CommonHyphenation fetch(CommonHyphenation chy) {
+    public CommonHyphenation fetch(CommonHyphenation chy) {
 
         return (CommonHyphenation) fetch((Object) chy);
     }
@@ -339,7 +350,7 @@
      *  @param cf the CommonFont instance to check for
      *  @return the cached instance
      */
-    public final CommonFont fetch(CommonFont cf) {
+    public CommonFont fetch(CommonFont cf) {
 
         return (CommonFont) fetch((Object) cf);
     }
@@ -352,21 +363,21 @@
      *  @param cbpb the CommonBorderPaddingBackground instance to check for
      *  @return the cached instance
      */
-    public final CommonBorderPaddingBackground fetch(CommonBorderPaddingBackground cbpb) {
+    public CommonBorderPaddingBackground fetch(CommonBorderPaddingBackground cbpb) {
 
         return (CommonBorderPaddingBackground) fetch((Object) cbpb);
     }
 
     /**
-     *  Checks if the given {@link CommonBorderPaddingBackground.BorderInfo} is present in the cache -
-     *  if so, returns a reference to the cached instance.
+     *  Checks if the given {@link CommonBorderPaddingBackground.BorderInfo} is present
+     *  in the cache - if so, returns a reference to the cached instance.
      *  Otherwise the given object is added to the cache and returned.
      *
      *  @param bi the BorderInfo instance to check for
      *  @return the cached instance
      */
-    public final CommonBorderPaddingBackground.BorderInfo fetch(CommonBorderPaddingBackground.BorderInfo bi) {
-
+    public CommonBorderPaddingBackground.BorderInfo fetch(
+            CommonBorderPaddingBackground.BorderInfo bi) {
         return (CommonBorderPaddingBackground.BorderInfo) fetch((Object) bi);
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java Tue Aug 26 02:10:19 2008
@@ -285,7 +285,7 @@
 
     /**
      * Get the string containing all the commands written into this
-     * Grpahics.
+     * Graphics.
      * @return the string containing the PDF markup
      */
     public String getString() {
@@ -294,7 +294,7 @@
 
     /**
      * Get the string buffer from the currentStream, containing all
-     * the commands written into this Grpahics so far.
+     * the commands written into this Graphics so far.
      * @return the StringBuffer containing the PDF markup
      */
     public StringBuffer getBuffer() {
@@ -872,7 +872,7 @@
         if (paint instanceof RadialGradientPaint) {
             RadialGradientPaint rgp = (RadialGradientPaint)paint;
 
-            // There is essentially no way to support repeate
+            // There is essentially no way to support repeats
             // in PDF for radial gradients (the one option would
             // be to 'grow' the outer circle until it fully covered
             // the bounds and then grow the stops accordingly, the

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFTextPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFTextPainter.java?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFTextPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFTextPainter.java Tue Aug 26 02:10:19 2008
@@ -147,7 +147,9 @@
 
             textUtil.beginTextObject();
             textUtil.setFonts(fonts);
-            textUtil.setTextRenderingMode(tpi.fillPaint != null, tpi.strokePaint != null, false);
+            boolean stroke = (tpi.strokePaint != null)
+                && (tpi.strokeStroke != null);
+            textUtil.setTextRenderingMode(tpi.fillPaint != null, stroke, false);
 
             AffineTransform localTransform = new AffineTransform();
             Point2D prevPos = null;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml Tue Aug 26 02:10:19 2008
@@ -53,6 +53,12 @@
 
   <changes>
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="JM" type="fix" importance="high">
+        Fixed memory leak in property cache (not cleaning stale PropertyCache$CacheEntry instances).
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        Fixed text stroking in SVG when the stroke-width is zero.
+      </action>
       <action context="Layout" dev="JM" type="fix">
         Fixed the source for a division by zero when the content of an fo:leader with
         leader-pattern="use-content" collapses to zero width during layout.
@@ -135,7 +141,7 @@
         Fixed a ClassCastException when using an fo:wrapper as a child
         of an fo:block-container.
       </action>
-      <action context="Fonts" dev="AC" type="add">
+      <action context="Fonts" dev="AC" type="add" importance="high">
         Add support for font substitution.
       </action>
       <action context="Renderers" dev="JM" type="fix" fixes-bug="43650">
@@ -158,7 +164,7 @@
         Add partial support for the "show-destination" property on fo:basic-link
         (PDF output only; see limitations on the compliance page)
       </action>
-      <action context="Layout" dev="JM" type="add">
+      <action context="Layout" dev="JM" type="add" importance="high">
         Added minimal support for integer keep values on the various keep properties on block-level
         FOs. For now, all integer values are treated the same (i.e. without strength distinction).
         Using integers allows to avoid overflows that can happen when "always" is used extensively.
@@ -186,7 +192,7 @@
         When a JPEG image is embedded, an optionally embedded color profile is filtered out
         as it's already embedded separately in the PDF file.
       </action>
-      <action context="Fonts" dev="JM" type="add">
+      <action context="Fonts" dev="JM" type="add" importance="high">
         Added support for addressing all glyphs available in a Type 1 font, not just the ones
         in the font's primary encoding.
       </action>
@@ -685,7 +691,7 @@
       <action context="Code" dev="JM" type="fix">
         AFP Renderer: Bugfix for 1 bit images where the width is not a multiple of 8.
       </action>
-      <action context="Code" dev="MM" type="add">
+      <action context="Code" dev="MM" type="add" importance="high">
         Support for keep-together.within-line="always".
       </action>
       <action context="Code" dev="MM" type="fix">

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/UtilityCodeTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/UtilityCodeTestSuite.java?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/UtilityCodeTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/UtilityCodeTestSuite.java Tue Aug 26 02:10:19 2008
@@ -26,7 +26,6 @@
 import org.apache.fop.pdf.PDFObjectTestCase;
 import org.apache.fop.traits.BorderPropsTestCase;
 import org.apache.fop.util.ColorUtilTestCase;
-import org.apache.fop.util.DataURIResolverTestCase;
 import org.apache.fop.util.ElementListUtilsTestCase;
 import org.apache.fop.util.PDFNumberTestCase;
 import org.apache.fop.util.XMLResourceBundleTestCase;
@@ -49,7 +48,6 @@
         suite.addTest(new TestSuite(ColorUtilTestCase.class));
         suite.addTest(new TestSuite(BorderPropsTestCase.class));
         suite.addTest(new TestSuite(ElementListUtilsTestCase.class));
-        suite.addTest(new TestSuite(DataURIResolverTestCase.class));
         suite.addTest(new TestSuite(BasicEventTestCase.class));
         suite.addTest(new TestSuite(XMLResourceBundleTestCase.class));
         //$JUnit-END$

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/memory/MemoryEater.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/memory/MemoryEater.java?rev=689005&r1=689004&r2=689005&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/memory/MemoryEater.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/memory/MemoryEater.java Tue Aug 26 02:10:19 2008
@@ -34,6 +34,7 @@
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.stream.StreamSource;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.NullOutputStream;
 
 import org.apache.fop.apps.FOUserAgent;
@@ -51,28 +52,48 @@
     private FopFactory fopFactory = FopFactory.newInstance();
     private Templates replicatorTemplates;
 
+    private Stats stats;
+
     public MemoryEater() throws TransformerConfigurationException, MalformedURLException {
         File xsltFile = new File("test/xsl/fo-replicator.xsl");
         Source xslt = new StreamSource(xsltFile);
         replicatorTemplates = tFactory.newTemplates(xslt);
     }
 
-    private void eatMemory(File foFile, int replicatorRepeats) throws Exception {
+    private void eatMemory(File foFile, int runRepeats, int replicatorRepeats) throws Exception {
+        stats = new Stats();
+        for (int i = 0; i < runRepeats; i++) {
+            eatMemory(i, foFile, replicatorRepeats);
+            stats.progress(i, runRepeats);
+        }
+        stats.dumpFinalStats();
+        System.out.println(stats.getGoogleChartURL());
+    }
+
+    private void eatMemory(int callIndex, File foFile, int replicatorRepeats) throws Exception {
         Source src = new StreamSource(foFile);
 
         Transformer transformer = replicatorTemplates.newTransformer();
         transformer.setParameter("repeats", new Integer(replicatorRepeats));
 
         OutputStream out = new NullOutputStream(); //write to /dev/nul
-        FOUserAgent userAgent = fopFactory.newFOUserAgent();
-        userAgent.setBaseURL(foFile.getParentFile().toURL().toExternalForm());
-        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out);
-        Result res = new SAXResult(fop.getDefaultHandler());
-
-        transformer.transform(src, res);
-
-        System.out.println("Generated " + fop.getResults().getPageCount() + " pages.");
-
+        try {
+            FOUserAgent userAgent = fopFactory.newFOUserAgent();
+            userAgent.setBaseURL(foFile.getParentFile().toURL().toExternalForm());
+            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out);
+            Result res = new SAXResult(fop.getDefaultHandler());
+
+            transformer.transform(src, res);
+
+            stats.notifyPagesProduced(fop.getResults().getPageCount());
+            if (callIndex == 0) {
+                System.out.println(foFile.getName() + " generates "
+                        + fop.getResults().getPageCount() + " pages.");
+            }
+            stats.checkStats();
+        } finally {
+            IOUtils.closeQuietly(out);
+        }
     }
 
     private static void prompt() throws IOException {
@@ -108,9 +129,7 @@
             long start = System.currentTimeMillis();
 
             MemoryEater app = new MemoryEater();
-            for (int i = 0; i < runRepeats; i++) {
-                app.eatMemory(testFile, replicatorRepeats);
-            }
+            app.eatMemory(testFile, runRepeats, replicatorRepeats);
 
             long duration = System.currentTimeMillis() - start;
             System.out.println("Success! Job took " + duration + " ms");



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org