Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 4025 invoked from network); 1 Sep 2005 14:04:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2005 14:04:40 -0000 Received: (qmail 88129 invoked by uid 500); 1 Sep 2005 14:04:39 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 88077 invoked by uid 500); 1 Sep 2005 14:04:39 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 88064 invoked by uid 99); 1 Sep 2005 14:04:39 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Sep 2005 07:04:39 -0700 Received: (qmail 3989 invoked by uid 65534); 1 Sep 2005 14:04:39 -0000 Message-ID: <20050901140439.3987.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r265735 - in /cocoon/branches/BRANCH_2_1_X: ./ src/java/org/apache/cocoon/serialization/ src/java/org/apache/cocoon/transformation/ Date: Thu, 01 Sep 2005 14:04:38 -0000 To: cvs@cocoon.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: cziegeler Date: Thu Sep 1 07:04:30 2005 New Revision: 265735 URL: http://svn.apache.org/viewcvs?rev=265735&view=rev Log: Revert Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/TextSerializer.java cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java cocoon/branches/BRANCH_2_1_X/status.xml Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=265735&r1=265734&r2=265735&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java Thu Sep 1 07:04:30 2005 @@ -90,19 +90,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) { @@ -275,13 +262,6 @@ } catch (Exception e) { 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); - } } /** @@ -293,7 +273,6 @@ if (this.namespacePipe != null) { this.namespacePipe.recycle(); } - this.gotRootElement = false; } /** @@ -583,24 +562,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/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/TextSerializer.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/TextSerializer.java?rev=265735&r1=265734&r2=265735&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/TextSerializer.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/TextSerializer.java Thu Sep 1 07:04:30 2005 @@ -22,7 +22,6 @@ import org.xml.sax.SAXException; import org.xml.sax.Attributes; -import org.xml.sax.helpers.AttributesImpl; import javax.xml.transform.OutputKeys; import javax.xml.transform.sax.TransformerHandler; Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java?rev=265735&r1=265734&r2=265735&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java Thu Sep 1 07:04:30 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/branches/BRANCH_2_1_X/status.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=265735&r1=265734&r2=265735&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/status.xml (original) +++ cocoon/branches/BRANCH_2_1_X/status.xml Thu Sep 1 07:04:30 2005 @@ -216,9 +216,6 @@ Portal block: Add WSRP consumer support (through WSRP4J). - - Add possibility to remove comments to all text based serializers and to cinclude transformer. - Updated hsqldb to 1.8.0.2.