Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 99141 invoked from network); 9 Mar 2004 00:57:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Mar 2004 00:57:29 -0000 Received: (qmail 63552 invoked by uid 500); 9 Mar 2004 00:57:13 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 63499 invoked by uid 500); 9 Mar 2004 00:57:13 -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: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 63474 invoked by uid 500); 9 Mar 2004 00:57:12 -0000 Delivered-To: apmail-cocoon-2.2-cvs@apache.org Received: (qmail 63471 invoked from network); 9 Mar 2004 00:57:12 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 9 Mar 2004 00:57:12 -0000 Received: (qmail 99104 invoked by uid 1672); 9 Mar 2004 00:57:27 -0000 Date: 9 Mar 2004 00:57:27 -0000 Message-ID: <20040309005727.99103.qmail@minotaur.apache.org> From: joerg@apache.org To: cocoon-2.2-cvs@apache.org Subject: cvs commit: cocoon-2.2/src/java/org/apache/cocoon/transformation FilterTransformer.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N joerg 2004/03/08 16:57:27 Modified: . status.xml src/java/org/apache/cocoon/transformation FilterTransformer.java Log: fixed bug 27301: Fix namespace handling in FilterTransformer. Revision Changes Path 1.188 +7 -1 cocoon-2.2/status.xml Index: status.xml =================================================================== RCS file: /home/cvs/cocoon-2.2/status.xml,v retrieving revision 1.187 retrieving revision 1.188 diff -u -r1.187 -r1.188 --- status.xml 8 Mar 2004 23:34:12 -0000 1.187 +++ status.xml 9 Mar 2004 00:57:27 -0000 1.188 @@ -189,6 +189,12 @@ + + Ported fix from 2.1 to FilterTransformer. + + + Fix namespace handling in FilterTransformer. + Added grayscaling and color transformation to the ImageReader. 1.4 +11 -6 cocoon-2.2/src/java/org/apache/cocoon/transformation/FilterTransformer.java Index: FilterTransformer.java =================================================================== RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/transformation/FilterTransformer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FilterTransformer.java 8 Mar 2004 14:03:31 -0000 1.3 +++ FilterTransformer.java 9 Mar 2004 00:57:27 -0000 1.4 @@ -127,12 +127,17 @@ if (this.currentBlocknr != (int)Math.ceil((float)this.counter/this.count)) { this.currentBlocknr = (int)Math.ceil((float)this.counter/this.count); AttributesImpl attr = new AttributesImpl(); - attr.addAttribute(uri, BLOCKID, BLOCKID,"CDATA",String.valueOf(this.currentBlocknr)); + attr.addAttribute("", BLOCKID, BLOCKID, "CDATA", String.valueOf(this.currentBlocknr)); if (this.counter < this.count) { - super.contentHandler.startElement(uri, BLOCK, BLOCK, attr); + super.contentHandler.startElement("", BLOCK, BLOCK, attr); } else { - super.contentHandler.endElement(uri, BLOCK, BLOCK); - super.contentHandler.startElement(uri, BLOCK, BLOCK, attr); + // fix Bugzilla Bug 13904, check if counter == 1 + // in this case there is no startElement( uri, BLOCK, BLOCK) + // written, yet + if (this.counter > 1) { + super.contentHandler.endElement(uri, BLOCK, BLOCK); + } + super.contentHandler.startElement("", BLOCK, BLOCK, attr); } } } else if (!this.foundIt) { @@ -150,7 +155,7 @@ // // // - super.contentHandler.endElement(uri, BLOCK, BLOCK); + super.contentHandler.endElement("", BLOCK, BLOCK); super.contentHandler.endElement(uri, name, raw); this.foundIt = false; this.skip = false;