Index: src/java/org/apache/cocoon/transformation/I18nTransformer.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java,v
retrieving revision 1.10
diff -u -r1.10 I18nTransformer.java
--- src/java/org/apache/cocoon/transformation/I18nTransformer.java	7 Feb 2002 07:41:24 -0000	1.10
+++ src/java/org/apache/cocoon/transformation/I18nTransformer.java	8 Feb 2002 13:47:46 -0000
@@ -626,6 +626,9 @@
     // elements.
     private int prev_state;
 
+    // Character data buffer, used to concat chunked character data
+    private StringBuffer strBuffer;
+
     // The i18n:key attribute is stored for the current element.
     // If no translation found for the key then the character data of element is
     // used as default value.
@@ -861,6 +864,10 @@
 
         if (I18N_NAMESPACE_URI.equals(uri)) {
             debug("Starting i18n element: " + name);
+            if (strBuffer != null) {
+                i18nCharacters(strBuffer.toString());
+                strBuffer = null;
+            }
             startI18NElement(name, attr);
             return;
         }
@@ -873,6 +880,10 @@
         throws SAXException {
 
         if (I18N_NAMESPACE_URI.equals(uri)) {
+            if (strBuffer != null) {
+                i18nCharacters(strBuffer.toString());
+                strBuffer = null;
+            }
             endI18NElement(name);
             return;
         }
@@ -883,7 +894,12 @@
     public void characters(char[] ch, int start, int len) throws SAXException {
 
         if (current_state != STATE_OUTSIDE) {
-            i18nCharacters(ch, start, len);
+            // Perform buffering to prevent chunked character data
+            if (strBuffer == null) {
+                strBuffer = new StringBuffer();
+            }
+            strBuffer.append(ch, start, len);
+
             return;
         }
 
@@ -1053,10 +1069,10 @@
         }
     }
 
-    private void i18nCharacters(char[] ch, int start, int len)
+    private void i18nCharacters(String textValue)
         throws SAXException {
 
-        String textValue = new String(ch, start, len).trim();
+        textValue = textValue.trim();
         if (textValue == null || textValue.length() == 0) {
             return;
         }
@@ -1076,7 +1092,8 @@
                 // reset the key holding variable
                 current_key = null;
             } else {    // use text value as dictionary key
-                translated_text = getString(textValue, (untranslated == null) ? textValue : untranslated);
+                translated_text = getString(textValue, (untranslated == null)
+                    ? textValue : untranslated);
             }
             break;
 
Index: src/webapp/i18n/simple.xsp
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/webapp/i18n/simple.xsp,v
retrieving revision 1.2
diff -u -r1.2 simple.xsp
--- src/webapp/i18n/simple.xsp	30 Jan 2002 14:56:12 -0000	1.2
+++ src/webapp/i18n/simple.xsp	8 Feb 2002 13:47:55 -0000
@@ -146,9 +146,9 @@
                         <xsp:expr>17 + 3 + 1974</xsp:expr>
                     </i18n:param>
 					<i18n:param type="number" sub-type="currency" src-locale="en">
-                        <xsp:expr>2002 / 28</xsp:expr>
+                        <xsp:expr>2002.0 / 28.0</xsp:expr>
                     </i18n:param>
-					<i18n:param type="number" sub-type="percent" src-locale="en">1.2</i18n:param>
+					<i18n:param type="number" sub-type="percent" src-locale="en">1.205</i18n:param>
 					<i18n:param type="date-time" pattern="MEDIUM"/>
 				</i18n:translate>
 			</para>

