Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 34401 invoked by uid 500); 10 Sep 2002 14:08:21 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 34387 invoked from network); 10 Sep 2002 14:08:20 -0000 From: "Per Kreipke" To: Subject: RE: XSP bug: can get generate() to skip elements using java 'if's Date: Tue, 10 Sep 2002 10:11:38 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Importance: Normal In-Reply-To: <3D7D97F0.E3293F09@wincor-nixdorf.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Michael, Thanks for the tip. However, your tip makes the problem even more interesting. When the 'if' statement is true, the does appear on the toplevel element and the XML is valid (no more array bounds exception). But when the 'if' statement is false, the element isn't the top most, it's emitted after the element. E.g. is a sibling of the element and the XML has _two_ top level elements, also invalid. Per > -----Original Message----- > From: Enke, Michael [mailto:michael.enke@wincor-nixdorf.com] > Sent: Tuesday, September 10, 2002 2:58 AM > To: cocoon-dev@xml.apache.org > Subject: Re: XSP bug: can get generate() to skip elements using java > 'if's > > > Per Kreipke wrote: > > > > The following XSP snippet will cause an > ArrayIndexOutOfBoundsException in > > Cocoon 2.0.3 because the start of the outer element is never > emitted to the > > SAX stream. > > > > XSP Snippet: > > > I would always write it as: > > > > > > if (!request.isUserInRole("root")) > { > Not authorized > } > else > { > > > > > > > } > > > > > > note: replaced by > and replaced by > > Michael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org