[ http://issues.apache.org/jira/browse/COCOON-1315?page=all ]
Gunnar Brand reopened COCOON-1315:
----------------------------------
The patch fixed most problems, but it forgets the flushing of trailing
characters. The result is that the unparsed '{...' characters appear as garbage
in the output. To fix that you need to change the following block in the
characters method:
> // '{' without a closing '}'
> // save char's from '{' in previous_ch in case the following call to
> characters()
> // provides the '}'
> previous_ch = new char[end - i];
> System.arraycopy(ch, i, previous_ch, 0, end - i);
> break;
must either not "break" but "return", or this should be added before the break:
> start = end;
> I18nTransformer: translation with param substitution
> ----------------------------------------------------
>
> Key: COCOON-1315
> URL: http://issues.apache.org/jira/browse/COCOON-1315
> Project: Cocoon
> Issue Type: Bug
> Components: - Components: Sitemap
> Affects Versions: 2.2-dev (Current SVN)
> Environment: Operating System: All
> Platform: All
> Reporter: Neil Bacon
> Assigned To: Cocoon Developers Team
> Attachments: ParamSaxBuffer.java.patch
>
>
> The i18n transformer does this occasionally:
> throw new SAXException("Unclosed '}'");
> A FIXME comment on the characters() method in:
> src/java/org/apache/cocoon/xml/ParamSaxBuffer.java 1.6
> indicates that the code doesn't handle the situation where the parser
> provides the opening '{' for an i18n parameter placeholder in one call
> to characters() and the closing '}' in a subsequent call.
> This doesn't seem to have itched anyone else, but we have some big
> translation files and its itching us, so I'll attach a patch in an attachment.
> (a tidier fix would be to always just buffer the text from characters() and
> process it later in endElement())
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira