cvs commit: xml-fop/src/documentation cocoon.diff forrest.diff
keiron 2002/12/05 01:30:16 Modified:src/documentation cocoon.diff forrest.diff Log: updated to latest cvs Revision ChangesPath 1.3 +18 -19xml-fop/src/documentation/cocoon.diff Index: cocoon.diff === RCS file: /home/cvs/xml-fop/src/documentation/cocoon.diff,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cocoon.diff 20 Nov 2002 09:24:07 - 1.2 +++ cocoon.diff 5 Dec 2002 09:30:16 - 1.3 @@ -1,11 +1,11 @@ Index: src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java === RCS file: /home/cvspublic/xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java,v -retrieving revision 1.3 -diff -u -r1.3 FOPSerializer.java src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 23 Sep 2002 03:30:44 - 1.3 -+++ src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 20 Nov 2002 07:53:48 - -@@ -62,18 +62,28 @@ +retrieving revision 1.4 +diff -u -r1.4 FOPSerializer.java +--- src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 21 Nov 2002 18:18:48 - 1.4 src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 5 Dec 2002 09:21:13 - +@@ -63,18 +63,28 @@ import org.apache.cocoon.components.url.URLFactory; import org.apache.cocoon.util.ClassUtils; import org.apache.cocoon.environment.URLFactorySourceResolver; @@ -38,7 +38,7 @@ import java.net.MalformedURLException; /** -@@ -83,7 +93,7 @@ +@@ -84,7 +94,7 @@ */ public class FOPSerializer extends AbstractSerializer @@ -47,7 +47,7 @@ /** * The Renderer Factory to use -@@ -96,6 +106,11 @@ +@@ -97,6 +107,11 @@ protected Driver driver; /** @@ -59,7 +59,7 @@ * The current Renderer. */ protected Renderer renderer; -@@ -144,24 +159,6 @@ +@@ -145,24 +160,6 @@ public void configure(Configuration conf) throws ConfigurationException { this.logger = getLogger().getChildLogger("fop"); @@ -84,7 +84,7 @@ this.setContentLength = conf.getChild("set-content-length").getValueAsBoolean(true); -@@ -179,28 +176,6 @@ +@@ -180,28 +177,6 @@ // New syntax: Element user-config contains URL configUrl = conf.getChild("user-config").getValue(null); } @@ -113,7 +113,7 @@ // Get the mime type. this.mimetype = conf.getAttribute("mime-type"); -@@ -232,6 +207,22 @@ +@@ -233,6 +208,22 @@ + "no renderer was specified in the sitemap configuration." ); } @@ -136,7 +136,7 @@ } /** -@@ -241,27 +232,40 @@ +@@ -242,27 +233,39 @@ return mimetype; } @@ -152,9 +152,9 @@ +ccf = new org.apache.cocoon.components.source.CocoonSourceFactory(null, manager); +ccf.enableLogging(logger); +source = ccf.getSource(env, "/" + uri); -+getLogger().error("Loading image from " + source.getSystemId()); ++getLogger().debug("Loading image from " + source.getSystemId()); +InputStream is = source.getInputStream(); -+getLogger().error("input stream: " + is + ":" + is.available()); ++getLogger().debug("input stream: " + is + ":" + is.available()); +return is; +} catch (Exception e) { +getLogger().error("Cannot load source", e); @@ -166,7 +166,6 @@ +//userAgent.setBaseURL(source.getSystemId()); + +driver.setUserAgent(userAgent); -+ +} + /** @@ -186,14 +185,14 @@ -if (getLogger().isWarnEnabled()) { -getLogger().warn("Cannot load class " + this.rendererName, e); -} --throw new RuntimeException("Cannot load class " + this.rendererName + "(" + e + ")"); +-throw new CascadingRuntimeException("Cannot load class " + this.rendererName, e); -} -} -this.driver.setRenderer(this.renderer); this.driver.setOutputStream(out); setContentHandler(this.driver.getContentHandler()); } -@@ -295,8 +299,7 @@ +@@ -296,8 +299,7 @@ */ public void recycle() { super.recycle(); @@ -203,7 +202,7 @@ } /** -@@ -306,3 +309,4 @@ +@@ -307,3 +309,4 @@ return this.setContentLength; } } @@ -214,7 +213,7 @@ retrieving revision 1.24 diff -u -r1.24 AbstractProcessingPipeline
cvs commit: xml-fop/src/documentation cocoon.diff
keiron 2002/11/20 01:24:07 Modified:src/documentation cocoon.diff Log: set creator as cocoon Revision ChangesPath 1.2 +7 -6 xml-fop/src/documentation/cocoon.diff Index: cocoon.diff === RCS file: /home/cvs/xml-fop/src/documentation/cocoon.diff,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cocoon.diff 12 Nov 2002 09:12:36 - 1.1 +++ cocoon.diff 20 Nov 2002 09:24:07 - 1.2 @@ -4,7 +4,7 @@ retrieving revision 1.3 diff -u -r1.3 FOPSerializer.java --- src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 23 Sep 2002 03:30:44 - 1.3 -+++ src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 8 Nov 2002 12:06:40 - src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 20 Nov 2002 07:53:48 - @@ -62,18 +62,28 @@ import org.apache.cocoon.components.url.URLFactory; import org.apache.cocoon.util.ClassUtils; @@ -113,10 +113,11 @@ // Get the mime type. this.mimetype = conf.getAttribute("mime-type"); -@@ -232,6 +207,21 @@ +@@ -232,6 +207,22 @@ + "no renderer was specified in the sitemap configuration." ); } ++this.renderer.setCreator("Cocoon"); + +userAgent = new FOUserAgent(); +userAgent.enableLogging(this.logger); @@ -135,7 +136,7 @@ } /** -@@ -241,27 +231,40 @@ +@@ -241,27 +232,40 @@ return mimetype; } @@ -192,7 +193,7 @@ this.driver.setOutputStream(out); setContentHandler(this.driver.getContentHandler()); } -@@ -295,8 +298,7 @@ +@@ -295,8 +299,7 @@ */ public void recycle() { super.recycle(); @@ -202,7 +203,7 @@ } /** -@@ -306,3 +308,4 @@ +@@ -306,3 +309,4 @@ return this.setContentLength; } } @@ -213,7 +214,7 @@ retrieving revision 1.24 diff -u -r1.24 AbstractProcessingPipeline.java --- src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java 11 Oct 2002 08:36:30 - 1.24 -+++ src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java 8 Nov 2002 12:06:40 - src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java 20 Nov 2002 07:53:48 - @@ -62,6 +62,7 @@ import org.apache.cocoon.ConnectionResetException; import org.apache.cocoon.ProcessingException; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation cocoon.diff forrest.diff
keiron 2002/11/12 01:12:36 Added: src/documentation cocoon.diff forrest.diff Log: diffs to make fop cvs trunk work with cocoon and forrest better handles images, pdf bookmarks and some other changes Revision ChangesPath 1.1 xml-fop/src/documentation/cocoon.diff Index: cocoon.diff === Index: src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java === RCS file: /home/cvspublic/xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java,v retrieving revision 1.3 diff -u -r1.3 FOPSerializer.java --- src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java23 Sep 2002 03:30:44 - 1.3 +++ src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java8 Nov 2002 12:06:40 - @@ -62,18 +62,28 @@ import org.apache.cocoon.components.url.URLFactory; import org.apache.cocoon.util.ClassUtils; import org.apache.cocoon.environment.URLFactorySourceResolver; -import org.apache.cocoon.environment.Source; +import org.apache.cocoon.environment.Environment; +import org.apache.excalibur.source.Source; +import org.apache.excalibur.source.SourceResolver; import org.apache.excalibur.source.SourceValidity; import org.apache.excalibur.source.impl.validity.NOPValidity; import org.apache.fop.apps.Driver; -import org.apache.fop.apps.Options; -import org.apache.fop.messaging.MessageHandler; import org.apache.fop.render.Renderer; -import org.apache.fop.configuration.ConfigurationParser; +import org.apache.fop.fo.FOUserAgent; +import org.apache.cocoon.components.RequestLifecycleComponent; +import org.apache.avalon.framework.component.Component; +import org.apache.cocoon.ProcessingException; +import org.xml.sax.SAXException; +import org.apache.cocoon.components.RequestLifecycleComponent; + +import java.io.IOException; +import java.util.Map; import java.io.OutputStream; import java.io.File; import java.io.Serializable; +import java.io.InputStream; +import java.net.URL; import java.net.MalformedURLException; /** @@ -83,7 +93,7 @@ */ public class FOPSerializer extends AbstractSerializer -implements Composable, Configurable, CacheableProcessingComponent { +implements Composable, Configurable, CacheableProcessingComponent, RequestLifecycleComponent { /** * The Renderer Factory to use @@ -96,6 +106,11 @@ protected Driver driver; /** + * The current FOUserAgent. + */ +protected FOUserAgent userAgent; + +/** * The current Renderer. */ protected Renderer renderer; @@ -144,24 +159,6 @@ public void configure(Configuration conf) throws ConfigurationException { this.logger = getLogger().getChildLogger("fop"); -MessageHandler.setScreenLogger(this.logger); - -// FIXME: VG: Initialize static FOP configuration with defaults, only once. -// FOP has static config, but that's going to change in the near future. -// Then this code should be reviewed. -synchronized (FOPSerializer.class) { -if (!configured) { -try { -if (getLogger().isDebugEnabled()) { -getLogger().debug("Loading default configuration"); -} -new Options(); -} catch (Exception e) { -getLogger().error("Cannot load default configuration. Proceeding.", e); -} -configured = true; -} -} this.setContentLength = conf.getChild("set-content-length").getValueAsBoolean(true); @@ -179,28 +176,6 @@ // New syntax: Element user-config contains URL configUrl = conf.getChild("user-config").getValue(null); } -if(configUrl != null) { -URLFactory urlFactory = null; -Source configSource = null; -try { -// FIXME: How to do without URLFactory but relative to context? -urlFactory = (URLFactory)manager.lookup(URLFactory.ROLE); -URLFactorySourceResolver urlResolver = new URLFactorySourceResolver(urlFactory, manager); -configSource = urlResolver.resolve(configUrl); -if (getLogger().isDebugEnabled()) { -getLogger().debug("Loading configuration from " + configSource.getSystemId()); -} -configSource.toSAX(new ConfigurationParser()); -} catch (Exception e) { -getLogger().warn("Cannot load configuration from " + configUrl); -throw new ConfigurationException("Cannot loa