cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: How to determine the end of character data?
Date Mon, 04 Feb 2002 18:22:58 GMT
Martin Holz wrote:

>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.
>
You have to react on both start and end : startElement() starts a nested 
child element, and endElement() terminates the current one. In both 
cases, this means end of the current text node.

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message