From cocoon-dev-return-22168-apmail-xml-cocoon-dev-archive=xml.apache.org@xml.apache.org Tue Feb 05 08:44:40 2002 Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 17776 invoked by uid 500); 5 Feb 2002 08:44:40 -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 17755 invoked from network); 5 Feb 2002 08:44:39 -0000 From: "Piroumian, Konstantin" To: cocoon-dev@xml.apache.org Message-ID: <044501c1ae21$5dda0e90$6150000a@flagship.ru> References: <03cd01c1ad94$9bd0c500$6150000a@flagship.ru> <49e27915b74fb5633920fc4a51b67aa03c5eb3d0@fiz-chemie.de> Subject: Re: How to determine the end of character data? Date: Tue, 5 Feb 2002 11:44:47 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > Piroumian, Konstantin wrote: > > Hi, Cocooners! > > > > According to SAX API the parser is free to split the character data to > > chunks. This causes problems in i18n transformer, which handles character > > data in the 'characters(char[] ch, int start, int length)' method. > > > > Is there a way to determine the end of the character data? The only > > solution seems to be to buffer all the character data then handle it on the > > first startElement() event following the characters(). > > Do you mean the next endElement() event? > > > Will this be correct? > > > > Then it should be correct. Yes, of course it must be also the endElement(). But what about this situation: This is a bold font. Here is the sequence of events: startElement("text") characters("Test is a ")* startElement("b") characters("bold")* endElement("b") characters("font")* endElement("text") *)maybe chunked As you can see either startElement() or endElement() could happen. Any ideas how to handle this correctly? Konstantin > > > Martin > > -- > Martin Holz phone: 0049-30-39977 218 > FIZ CHEMIE BERLIN > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org