cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject RE: recursive func in XSP?
Date Mon, 05 Jun 2000 19:59:03 GMT
On Mon, 5 Jun 2000, Neeme Praks wrote:

> 
> > -----Original Message-----
> > From: Stefano Mazzocchi [mailto:stefano@apache.org]
> > Sent: Monday, June 05, 2000 2:09 PM
> > 
> > > One more question: is there somewhere some documentation about these
> > > built-in variables?
> > 
> > No and you should not be aware of them!
> > 
> > People,
> > 
> > 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!
> > 
> > So, use
> > 
> >  <xsp:expr>yourMethod()</xsp:expr>
> > 
> > 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?

Put the logic into a library and make it recursive like normal:

Node getRecursiveInfo(int arg) {
  // foo
  Node node = getRecursiveInfo(arg--);
  // bar
}

and invoke it from your XSP page using xsp:expr.

- donald


Mime
View raw message