[Yanel-usage] Recursion in jelly templates

Bilgin Ibryam bibryam at gmail.com
Fri Feb 11 14:33:57 CET 2011


I will try using xslt tags.
Thanks Cedric

On Thu, Feb 10, 2011 at 9:43 PM, Cedric Staub <cedric.staub at wyona.com>wrote:

> Hello Bilgin
>
> On Thu, Feb 10, 2011 at 05:53:57PM +0000, Bilgin Ibryam wrote:
> > I'd like to display a tree structure using jelly templates, but can't
> find a
> > way to iterate over all the nodes w/o doing recursive calls.
> > Any ideas how can I display tree structure or do recursive calls in jelly
> (I
> > checked the jelly tutorial but couldn't find anything useful there)?
>
> As far as I know both Jelly and XSLT are functional languages (not sure
> about Jelly, but XSLT is certainly purely functional). This means that
> you will have to use recursion to print your tree, since functional
> languages can't have mutable state.
>
> That said, I never actually used Jelly in this fashion (I prefer XSLT
> over Jelly). But if I understand the Jelly documentation correctly, you
> should be able to use the template/applyTemplates tags to define and
> recursively apply templates.
>
> See here: https://commons.apache.org/jelly/libs/jsl/tags.html
>
> Cheers,
> Cedric
> --
> Yanel-usage mailing list Yanel-usage at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-usage
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-usage/attachments/20110211/85269559/attachment.html>


More information about the Yanel-usage mailing list