Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 32208 invoked by uid 500); 14 Aug 2002 08:27:15 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 32194 invoked from network); 14 Aug 2002 08:27:15 -0000 Message-ID: From: Piroumian Konstantin To: "'cocoon-users@xml.apache.org'" Subject: RE: i18n:attr processing problem (ArrayIndexOutOfBoundsException) Date: Wed, 14 Aug 2002 12:29:03 +0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="koi8-r" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is not a bug of i18n transformer. If you see, the problem comes from the org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesImpl.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.) -- Konstantin Piroumian kpiroumian@apache.org > -----Original Message----- > From: KOZLOV Roman [mailto:r-kozlov@opencascade.com] > 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 > > 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: > > 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. > > To unsubscribe, e-mail: > For additional commands, e-mail: > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: