Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 92530 invoked from network); 20 Nov 2003 10:16:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Nov 2003 10:16:45 -0000 Received: (qmail 11659 invoked by uid 500); 20 Nov 2003 10:16:11 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 11625 invoked by uid 500); 20 Nov 2003 10:16:10 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 11612 invoked from network); 20 Nov 2003 10:16:10 -0000 Received: from unknown (HELO sati.virbus.de) (145.253.246.81) by daedalus.apache.org with SMTP; 20 Nov 2003 10:16:10 -0000 Received: from sati.virbus.de (localhost [127.0.0.1]) by localhost (SMTP Server) with ESMTP id 99BDF166A52 for ; Thu, 20 Nov 2003 11:16:22 +0100 (MET) Received: from virbus.de (saraswati.virbus.de [212.144.5.199]) by sati.virbus.de (SMTP Server) with ESMTP id 18DE6166A33 for ; Thu, 20 Nov 2003 11:16:22 +0100 (MET) Message-ID: <3FBC9475.2080300@virbus.de> Date: Thu, 20 Nov 2003 11:16:21 +0100 From: Joerg Heinicke User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: de-de, de, en, en-us MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Possible bug in XSP generator References: <33016.10.0.0.5.1069318489.squirrel@ags01.agsoftware.dnsalias.com> In-Reply-To: <33016.10.0.0.5.1069318489.squirrel@ags01.agsoftware.dnsalias.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Antonio Gallardo wrote: > Try this: > > > for (java.util.Iterator it = ajs.getMods().iterator(); it.hasNext(); ) { > > it.next().toString()
> > } > Uh, that's ugly! I feel reminded to println("") code! I much more like David's approach using an additional . The reason for this XSP bug is the stylesheet. Around line 400 there is a template () XSPObjectHelper.xspExpr(contentHandler, ); As you can see the first option tests for a surrounding XSP element as xsp:logic is one (and probably also your parent element of xsp:logic, this is why Antonio's approach also fails). But I don't know what exactly is the use case for this. Maybe somebody else can shed some light on this? Joerg > Carmona Perez, David dijo: > >>Hi all, >> >>I have this snippet in an XSP file: >> >> >> for (java.util.Iterator it = ajs.getMods().iterator(); it.hasNext(); >>) { >> String mod = it.next().toString(); >> mod
>> } >>
>> >>and the following code is generated: >> >>for (java.util.Iterator it = ajs.getMods().iterator(); it.hasNext(); ) { >> String mod = it.next().toString(); >>(mod) >>this.contentHandler.startElement("", "br", "br", xspAttr); >> xspAttr.clear(); >> } >> >> >>I think that the right code would be: >> >>for (java.util.Iterator it = ajs.getMods().iterator(); it.hasNext(); ) { >> String mod = it.next().toString(); >>this.characters(mod); <------------------------ >>this.contentHandler.startElement("", "br", "br", xspAttr); >> xspAttr.clear(); >> } >> >>Is this really a bug of the XSP generator? >>-------- >>David -- System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 joerg.heinicke@virbus.de www.virbus.de --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org