cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/transformation CIncludeTransformer.java
Date Wed, 25 Sep 2002 11:54:34 GMT
cziegeler    2002/09/25 04:54:34

  Modified:    src/java/org/apache/cocoon/transformation
                        CIncludeTransformer.java
  Log:
  Deleting duplicate stuff
  
  Revision  Changes    Path
  1.12      +13 -30    xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
  
  Index: CIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CIncludeTransformer.java	25 Sep 2002 11:45:35 -0000	1.11
  +++ CIncludeTransformer.java	25 Sep 2002 11:54:34 -0000	1.12
  @@ -50,29 +50,27 @@
   */
   package org.apache.cocoon.transformation;
   
  +import org.apache.avalon.excalibur.xml.Parser;
  +import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
   import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException; 
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
   import org.apache.cocoon.xml.XMLUtils;
  -import org.apache.avalon.excalibur.xml.Parser;
  -import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceParameters;
   import org.w3c.dom.Document;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
  +import org.xml.sax.Attributes;
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.InputSource;
  -import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
  +import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.helpers.AttributesImpl;
   
   import java.io.IOException;
  @@ -91,8 +89,8 @@
    * @author <a href="mailto:acoliver@apache.org">Andrew C. Oliver</a>
    * @version CVS $Id$
    */
  -public class CIncludeTransformer extends AbstractSAXTransformer
  -implements Composable {
  +public class CIncludeTransformer 
  +extends AbstractSAXTransformer {
   
       public static final String CINCLUDE_NAMESPACE_URI = "http://apache.org/cocoon/include/1.0";
       public static final String CINCLUDE_INCLUDE_ELEMENT = "include";
  @@ -123,13 +121,6 @@
       /** The current state: STATE_ */
       protected int state;
       
  -    /** The <code>SourceResolver</code> */
  -    protected SourceResolver sourceResolver;
  -
  -    /** The current <code>ComponentManager</code>. */
  -    protected ComponentManager manager = null;
  -
  -
       /**
        * Constructor
        * Set the namespace
  @@ -144,23 +135,15 @@
       public void setup(SourceResolver resolver, Map objectModel,
                         String source, Parameters parameters)
       throws ProcessingException, SAXException, IOException {
  -        this.sourceResolver = resolver;
  +        super.setup(resolver, objectModel, source, parameters);
           this.state = STATE_OUTSIDE;
       }
   
       /**
  -     * Composable Interface
  -     */
  -    public final void compose(final ComponentManager manager) {
  -        this.manager = manager;
  -    }
  -
  -    /**
        * Recycle the component
        */
       public void recycle() {
           super.recycle();
  -        this.sourceResolver = null;
           this.configurationParameters = null;
           this.resourceParameters = null;
       }
  @@ -253,7 +236,7 @@
               } catch (SourceException se) {
                   throw SourceUtil.handle(se);
               } finally {
  -                this.sourceResolver.release(source);
  +                this.resolver.release(source);
               }
   
               // restore values
  @@ -339,7 +322,7 @@
   
           Source source = null;
           try {
  -            source = this.sourceResolver.resolveURI(src);
  +            source = this.resolver.resolveURI(src);
   
               if (!"".equals(select)) {
   
  @@ -366,7 +349,7 @@
                       this.manager.release((Component)processor);
                   }
               } else {
  -                this.sourceResolver.toSAX(source, consumer);
  +                this.resolver.toSAX(source, consumer);
               }
   
   
  @@ -379,7 +362,7 @@
           } catch(ComponentException e) {
               throw new SAXException(e);
           } finally {
  -            this.sourceResolver.release(source);
  +            this.resolver.release(source);
           }
   
           if (!"".equals(element)) {
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message