Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 26699 invoked from network); 15 Oct 2004 14:05:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Oct 2004 14:05:46 -0000 Received: (qmail 95076 invoked by uid 500); 15 Oct 2004 14:05:36 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 94935 invoked by uid 500); 15 Oct 2004 14:05:34 -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 Delivered-To: moderator for users@cocoon.apache.org Received: (qmail 26847 invoked by uid 99); 15 Oct 2004 13:09:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Message-ID: <416FCC0D.8060209@assa-systems.de> Date: Fri, 15 Oct 2004 15:09:33 +0200 From: Thomas Krause User-Agent: Thunderbird 0.7 (Windows/20040616) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: xsp: defining a recursive methode which produces xml elements in References: <416FC5BA.1040903@inf.tu-dresden.de> In-Reply-To: <416FC5BA.1040903@inf.tu-dresden.de> Content-Type: multipart/mixed; boundary="------------020400060606090507000607" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --------------020400060606090507000607 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I wrote to the cocoon dev to change this procedure but they think it's clear enough. The this xsp for example. Thomas Andreas Doms schrieb: > I need to define a recursive methode which produces nested xml tags. > > > private void produced(...){ > > produced(...); > > } > > > this gives the error "xspAttr cannot be resolved" because the xspAttr is > not known the gerated methode. > > Any concept to solve this problem elegant? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org --------------020400060606090507000607 Content-Type: text/xml; name="groups-hierarchy.xsp" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="groups-hierarchy.xsp" %ISOlat1; %ISOnum; ]> de.heimhuber.emiproject.ejb.* java.util.* private void processGroupHierarchyNode( org.xml.sax.helpers.AttributesImpl xspAttr, GroupHierarchyNode node) throws Exception { Iterator iterator; GroupData group = node.getGroup(); group.getId() group.getName() if ( group.getParent() != null ) { group.getParent().getId() group.getParent().getName() } if ( group.getBoss() != null ) { group.getBoss().getId() group.getBoss().getUsername() } if ( group.getApprover() != null ) { group.getApprover().getId() group.getApprover().getUsername() } if ( group.getProjectManager() != null ) { group.getProjectManager().getId() group.getProjectManager().getUsername() } if ( group.getIsProjectTarget().booleanValue() ) { 1 } else { 0 } if ( group.getProjectControler() != null ) { group.getProjectControler().getId() group.getProjectControler().getUsername() } if ( group.getProjectTracker() != null ) { group.getProjectTracker().getId() group.getProjectTracker().getUsername() } node.getLevel() node.getMaxChilds() int numberOfChildGroups = node.getChildGroups().size(); if ( numberOfChildGroups == 0 ) { numberOfChildGroups = 1; } numberOfChildGroups iterator = node.getChildGroups().iterator(); while ( iterator.hasNext() ) { this.processGroupHierarchyNode( xspAttr, (GroupHierarchyNode)iterator.next() ); } } empty.html Iterator hierarchyIterator = GroupUtil.getHome().getGroupHierarchies().iterator(); while ( hierarchyIterator.hasNext() ) { GroupHierarchyNode rootNode = (GroupHierarchyNode)hierarchyIterator.next(); rootNode.getGroup().getName() this.processGroupHierarchyNode( xspAttr, rootNode ); } --------------020400060606090507000607 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org --------------020400060606090507000607--