> From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]] > > This is not a bug of i18n transformer. > > If you see, the problem comes from the > org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesI > mpl.java:439). > This is known bug in Xerces and it was fixed in latest > versions. So, there > are two ways of solving this problem: > - upgrade to a newer version of Xerces if possible > (this is the best > solution) > - hack i18n transformer and comment out the > 'removeAttribute()' call > from translateAttributes() > > (Reminder for myself: Create a FAQ entry on this topic.)
Done. See http://outerthought.net/wiki/Edit.jsp?page=FAQs KP > -- > Konstantin Piroumian > [EMAIL PROTECTED] > > > > -----Original Message----- > > From: KOZLOV Roman [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 14, 2002 11:10 AM > > To: Cocoon users mail list > > Subject: 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(AttributesI > > mpl.java:439) > > > > at > > org.apache.cocoon.transformation.I18nTransformer.translateAttr > > ibutes(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: <[EMAIL PROTECTED]> > > For additional commands, e-mail: > <[EMAIL PROTECTED]> > > > > --------------------------------------------------------------------- > 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>