Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 19217 invoked by uid 500); 5 May 2003 19:43:34 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 19204 invoked from network); 5 May 2003 19:43:34 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 5 May 2003 19:43:34 -0000 Received: (qmail 11837 invoked by uid 50); 5 May 2003 19:45:40 -0000 Date: 5 May 2003 19:45:40 -0000 Message-ID: <20030505194540.11836.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: cocoon-dev@xml.apache.org Cc: Subject: DO NOT REPLY [Bug 19683] New: - Cocoon SAX TextRecorder eats legitimate spaces in corner cases X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19683 Cocoon SAX TextRecorder eats legitimate spaces in corner cases Summary: Cocoon SAX TextRecorder eats legitimate spaces in corner cases Product: Cocoon 2 Version: Current CVS 2.1 Platform: Sun OS/Version: Solaris Status: NEW Severity: Major Priority: Other Component: core AssignedTo: cocoon-dev@xml.apache.org ReportedBy: rjohnst@juniper.net In the TextRecorder.java, I see the following: public void characters(char ary[], int start, int length) throws SAXException { String value = new String(ary, start, length).trim(); if (value.length() > 0) { buffer.append(value); } else { buffer.append(' '); } } I am wondering what the logic behind having the trim() in there is. Several times I have noticed Cocoon "eating" spaces out of the stream as evidenced in this log: INFO 2003-03-28 16:05:14.728 [sitemap.transformer.log ] (): [startElement] uri=http://xml.juniper.net/cocoon/work-schedule/1.0,local=start,raw=sched:start DEBUG 2003-03-28 16:05:14.729 [sitemap.transformer.sche] (): BEGIN startTextRecording DEBUG 2003-03-28 16:05:14.730 [sitemap.transformer.sche] (): END startTextRecording INFO 2003-03-28 16:05:14.731 [sitemap.transformer.log ] (): [characters] 03/28/2003 INFO 2003-03-28 16:05:14.733 [sitemap.transformer.log ] (): [characters] 04:05 PM INFO 2003-03-28 16:05:14.734 [sitemap.transformer.log ] (): [endElement] uri=http://xml.juniper.net/cocoon/work- schedule/1.0,local=start,qname=sched:start DEBUG 2003-03-28 16:05:14.735 [sitemap.transformer.sche] (): BEGIN endTextRecording DEBUG 2003-03-28 16:05:14.736 [sitemap.transformer.sche] (): END endTextRecording text=03/28/200304:05 PM INFO 2003-03-28 16:05:14.737 [sitemap.transformer.log ] (): [endElement] uri=http://xml.juniper.net/cocoon/work- schedule/1.0,local=every,qname=sched:every ERROR 2003-03-28 16:05:14.739 [sitemap.transformer.sche] (): URLWorkScheduleTransformer: invalid time: 03/28/200304:05 PM 03/28/2003 04:05 PM is what is supposed to be being passed to the next transformer, but instead, it is showing up in two different [characters] events, and because of the trim(), it ends up being put back together as "03/28/200304:05 PM" which is invalid. I am 99% sure this is a bug -- and a major one at that. thanks, rob