Subject: RE: Complex recursion in XSLT 1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 18 Feb 2008 18:06:12 -0000
|
If you're going to resort to escaping to Java and using mutable objects that
way, then you can probably use a completely different algorithm. But that's
cheating...
In any case, using XSLT 2.0 sequences to maintain a stack is really dead
easy. (In this case I don't think it even needs to be a stack, strictly
speaking - it can just be a queue of elements awaiting processing, and you
can probably take them off the queue in any order.)
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Mukul Gandhi [mailto:gandhi.mukul@xxxxxxxxx]
> Sent: 18 February 2008 17:16
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: Complex recursion in XSLT 1.0
>
> On Feb 18, 2008 7:43 PM, Marroc <marrocdanderfluff@xxxxxxxxxxx> wrote:
> > Perhaps if I build a stack as a node-set I might be able to
> crack this one!
>
> To implement Stack in the XSLT stylesheet, you might use a
> Java extension for using Stack in an external Java object.
> This should be easily achievable.
>
>
> --
> Regards,
> Mukul Gandhi
|