joerg       2004/02/07 05:18:16

  Modified:    src/blocks/batik/java/org/apache/cocoon/serialization
                        SVGSerializer.java
               src/blocks/fop/java/org/apache/cocoon/serialization
                        FOPSerializer.java
  Log:
  revert the setting of the Cocoon source resolver for batik as this breaks 
internal URIs and so our batik and ascii art samples
  
  Revision  Changes    Path
  1.12      +8 -14     
cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/serialization/SVGSerializer.java
  
  Index: SVGSerializer.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/serialization/SVGSerializer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SVGSerializer.java        4 Feb 2004 14:39:28 -0000       1.11
  +++ SVGSerializer.java        7 Feb 2004 13:18:16 -0000       1.12
  @@ -54,13 +54,9 @@
   import java.io.OutputStream;
   
   import org.apache.avalon.excalibur.pool.Poolable;
  -import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.service.ServiceException;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.Serviceable;
   import org.apache.batik.transcoder.Transcoder;
   import org.apache.batik.transcoder.TranscoderException;
   import org.apache.batik.transcoder.TranscoderInput;
  @@ -69,10 +65,8 @@
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.transcoder.ExtendableTranscoderFactory;
   import org.apache.cocoon.components.transcoder.TranscoderFactory;
  -import org.apache.cocoon.components.url.SourceProtocolHandler;
   import org.apache.cocoon.util.ClassUtils;
   import org.apache.cocoon.xml.dom.SVGBuilder;
  -import org.apache.excalibur.source.SourceResolver;
   import org.apache.excalibur.source.SourceValidity;
   import org.apache.excalibur.source.impl.validity.NOPValidity;
   import org.w3c.dom.Document;
  @@ -86,7 +80,7 @@
    * @version CVS $Id$
    */
   public class SVGSerializer extends SVGBuilder
  -implements Serializer, Configurable, Poolable, CacheableProcessingComponent, 
Serviceable, Disposable /*, Contextualizable*/ {
  +implements Serializer, Configurable, Poolable, 
CacheableProcessingComponent/*, Serviceable, Disposable , Contextualizable*/ {
   
   //    /**
   //     * Get the context
  @@ -110,9 +104,9 @@
       /** The Transcoder Factory to use */
       TranscoderFactory factory = 
ExtendableTranscoderFactory.getTranscoderFactoryImplementation();
       
  -    private ServiceManager manager;
  +//    private ServiceManager manager;
   
  -    private SourceResolver resolver;
  +//    private SourceResolver resolver;
   
       /**
        * Set the <code>OutputStream</code> where the XML should be serialized.
  @@ -121,18 +115,18 @@
           this.output = out;
           
           // Give the source resolver to Batik
  -        SourceProtocolHandler.setup(this.resolver);
  +        //SourceProtocolHandler.setup(this.resolver);
       }
       
  -    public void service(ServiceManager manager) throws ServiceException {
  +/*    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
           this.resolver = 
(SourceResolver)this.manager.lookup(SourceResolver.ROLE);
       }
  -    
  +
       public void dispose() {
           this.manager.release(this.resolver);
       }
  -
  +*/
       /**
        * Set the configurations for this serializer.
        */
  
  
  
  1.8       +7 -9      
cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java
  
  Index: FOPSerializer.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FOPSerializer.java        4 Feb 2004 14:39:58 -0000       1.7
  +++ FOPSerializer.java        7 Feb 2004 13:18:16 -0000       1.8
  @@ -56,7 +56,6 @@
   import java.net.MalformedURLException;
   
   import org.apache.avalon.framework.CascadingRuntimeException;
  -import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -68,7 +67,6 @@
   import org.apache.cocoon.components.renderer.ExtendableRendererFactory;
   import org.apache.cocoon.components.renderer.RendererFactory;
   import org.apache.cocoon.components.source.SourceUtil;
  -import org.apache.cocoon.components.url.SourceProtocolHandler;
   import org.apache.cocoon.util.ClassUtils;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceResolver;
  @@ -86,9 +84,9 @@
    * @version CVS $Id$
    */
   public class FOPSerializer extends AbstractSerializer implements
  -  Configurable, CacheableProcessingComponent, Serviceable, Disposable {
  +  Configurable, CacheableProcessingComponent, Serviceable/*, Disposable */{
   
  -    protected SourceResolver resolver;
  +    //protected SourceResolver resolver;
   
       /**
        * The Renderer Factory to use
  @@ -140,13 +138,13 @@
        */
       public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
  -        this.resolver = 
(SourceResolver)this.manager.lookup(SourceResolver.ROLE);
  +        //this.resolver = 
(SourceResolver)this.manager.lookup(SourceResolver.ROLE);
       }
  -
  +/*
       public void dispose() {
           this.manager.release(this.resolver);
       }
  -
  +*/
       /**
        * Set the configurations for this serializer.
        */
  @@ -258,7 +256,7 @@
       public void setOutputStream(OutputStream out) {
           
           // Give the source resolver to Batik which is used by FOP
  -        SourceProtocolHandler.setup(this.resolver);
  +        //SourceProtocolHandler.setup(this.resolver);
   
           // load the fop driver
           this.driver = new Driver();
  
  
  

Reply via email to