cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r265722 - in /cocoon/trunk: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Date Thu, 01 Sep 2005 13:39:39 GMT
Author: cziegeler
Date: Thu Sep  1 06:39:33 2005
New Revision: 265722

URL: http://svn.apache.org/viewcvs?rev=265722&view=rev
Log:
Revert

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
    cocoon/trunk/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
    cocoon/trunk/status.xml

Modified: cocoon/trunk/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=265722&r1=265721&r2=265722&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java Thu
Sep  1 06:39:33 2005
@@ -88,19 +88,6 @@
     private String cachingKey = "1";
 
     /**
-     * Do we remove all comments?
-     */
-    private boolean removeComments = false;
-
-    /**
-     * If we remove comments, do we keep the document comment?
-     */
-    private boolean keepDocumentComment = true;
-
-    /** Did we get the root element already? */
-    private boolean gotRootElement = false;
-
-    /**
      * Interpose namespace pipe if needed.
      */
     public void setConsumer(XMLConsumer consumer) {
@@ -271,12 +258,6 @@
             getLogger().warn("Cannot know if transformer needs namespaces attributes - assuming
NO.", e);
         }
 
-        this.removeComments = conf.getChild("remove-comments").getValueAsBoolean(this.removeComments);
-        this.keepDocumentComment = conf.getChild("keep-document-comment").getValueAsBoolean(this.keepDocumentComment);
-        if ( this.getLogger().isDebugEnabled() ) {
-            this.getLogger().debug("Comment settings: remove comments: " + this.removeComments
-                                 + ", keep document comment: " + this.keepDocumentComment);
-        }
     }
 
     /**
@@ -288,7 +269,6 @@
         if (this.namespacePipe != null) {
             this.namespacePipe.recycle();
         }
-        this.gotRootElement = false;
     }
 
     /**
@@ -578,23 +558,6 @@
         //       } catch (IOException ignored) {
         //       }
         //   }
-    }
-
-    /**
-     * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
-     */
-    public void comment(char[] ch, int start, int len) throws SAXException {
-        if ( !this.removeComments
-             || (!this.gotRootElement && this.keepDocumentComment)) {
-            super.comment(ch, start, len);
-        }
-    }
-    /**
-     * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String,
org.xml.sax.Attributes)
-     */
-    public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException
{
-        this.gotRootElement = true;
-        super.startElement(uri, loc, raw, a);
     }
 
 }

Modified: cocoon/trunk/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java?rev=265722&r1=265721&r2=265722&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java Thu Sep
 1 06:39:33 2005
@@ -628,8 +628,7 @@
      */
     public void startDocument() throws SAXException {
         this.filter = new MyFilter(this.xmlConsumer,
-                                   this, 
-                                   this.parameters.getParameterAsBoolean("remove-comments",
false));
+                                   this);
         super.startDocument();
     }
 
@@ -684,18 +683,14 @@
 
     private final CIncludeTransformer transformer;
 
-    private final boolean removeComments;
-
     /**
      * This filter class post-processes the parallel fetching
      * @param consumer
      */
     public MyFilter(XMLConsumer consumer,
-                    CIncludeTransformer transformer,
-                    boolean removeComments) {
+                    CIncludeTransformer transformer) {
         super(consumer);
         this.transformer = transformer;
-        this.removeComments = removeComments;
     }
 
     /**
@@ -732,15 +727,6 @@
             }
         } else {
             super.startElement(uri, local, qName, attr);
-        }
-    }
-
-    /**
-     * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
-     */
-    public void comment(char[] ary, int start, int length) throws SAXException {
-        if ( !this.removeComments ) {
-            super.comment(ary, start, length);
         }
     }
 }

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=265722&r1=265721&r2=265722&view=diff
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Thu Sep  1 06:39:33 2005
@@ -554,9 +554,6 @@
     <action dev="CZ" type="add">
       Portal block: Add WSRP consumer support (through WSRP4J).
     </action>
-    <action dev="CZ" type="add">
-      Add possibility to remove comments to all text based serializers and to cinclude transformer.
-    </action>
     <action dev="AG" type="update">
       Updated hsqldb to 1.8.0.2.
     </action>



Mime
View raw message