You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by KOZLOV Roman <r-...@opencascade.com> on 2002/08/14 09:10:29 UTC

i18n:attr processing problem (ArrayIndexOutOfBoundsException)

Hi,

It seems that there is a bug in the i18n transformer.
1. Configuration: JDK1.4, Cocoon 2.0.3, Tomcat 4.0.4
2. Bug description:
- I've pipeline like xml -> i18n transformer -> serializer;
- XML source contains an element like
    <input i18n:attr="value" value="somekey" type="reset"/>
Note: order of attributes is significant.
- Such a pipeline crashes with the
java.lang.ArrayIndexOutOfBoundsException :

Original exception : java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesImpl.java:439)

at
org.apache.cocoon.transformation.I18nTransformer.translateAttributes(I18nTransformer.java:1146)

at
org.apache.cocoon.transformation.I18nTransformer.startElement(I18nTransformer.java:868)

. . .

3. The same problem is occured when an element with i18n:attr is created
during xsl transformation, but with reversing order of attributes, for
example:
    <input type="reset" value="somekey" i18n:attr="value"/>
because after xsl transformation attributes in its result are appeared
in reversed order

4. WORKAROUND: for XML (first case) - set i18n:attr as the last
attribute of an element;
for XSL (second case) - set i18n:attr as the first attribute of an
element.

Best regards,
        Roman




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>