Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 19781 invoked from network); 5 Jun 2000 21:02:38 -0000 Received: from the.one.lv (159.148.169.70) by locus.apache.org with SMTP; 5 Jun 2000 21:02:38 -0000 content-class: urn:content-classes:message From: "Neeme Praks" To: Subject: RE: recursive func in XSP? Date: Mon, 5 Jun 2000 23:04:03 +0200 Message-ID: <2ECFE9456D0F6A4FA77B38C25AAE230918FF@the.one.lv> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.4208.0 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: recursive func in XSP? Thread-Index: Ab/PFVs1Zukc3lOBRt+KIV2/sVhsBwAGXhNQ X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Stefano Mazzocchi [mailto:stefano@apache.org] > Sent: Monday, June 05, 2000 2:09 PM >=20 > > One more question: is there somewhere some documentation about these > > built-in variables? >=20 > No and you should not be aware of them! >=20 > People, >=20 > xsp were designed so that you didn't require to know how they are > compiled to make them work. If you tie yourself to a particular XSP > engine implementation, you're fucked! >=20 > So, use >=20 > yourMethod() >=20 > and only this! I understand and share your concern, this is the reason why I brought up the issue in the first place. I would love to use the a standard way to achieve this, but I have't got an answer to my question yet: how can I make this kind of recursive function work with the standard XSP methods, without tying myself to a particular XSP engine implementation? Something like this: private ?? what does it return ?? BuildTree( FolderTree tree) throws Exception { Folder folder =3D tree.getRoot(); long ID =3D folder.getId(); String.valueOf(ID) =09 folder.getName() if (tree.getNodes() !=3D null) { for (int i =3D 0; i < tree.getNodes().length; i++) { =09 BuildTree(tree.getNodes()[i]) } } } int UserID =3D 1; FolderTree tree =3D FolderUtility.getTreeByUser(UserID, UserID); BuildTree(tree) The example is probably syntactically incorrect, but you should get the basic idea what I'm aiming at... Neeme