[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Nested xsl:iterate with innermost xsl:on-completion?


Subject: Re: [xsl] Nested xsl:iterate with innermost xsl:on-completion?
From: "Tony Graham" <tgraham@xxxxxxxxxx>
Date: Fri, 14 Feb 2014 16:27:14 -0000 (GMT)

On Fri, February 14, 2014 8:47 am, Michael Kay wrote:
> If I've understood this correctly, it's a classic case where you want to
> do some processing that returns a "primary result" - the result of
> transforming/formatting the table cells, and also a "secondary result" -
> information about the row spans.

Yes, that's it.

> Returning the two results as a combined value (perhaps a map, or as you
> are doing, a sequence) is one way. Another way is to split the two
> computations, processing the same input twice in two different ways to
> compute the two results. As you point out, neither is very satisfactory;
> doing two passes is likely to involve duplication of effort, while the
> single-pass, composite result approach is likely to involve storing the
> whole composite result in memory.
>
> I think I would be inclined here to compute the cell map in a first pass
> over the input, and then pass this as a parameter to the second pass which
> generates the "primary" output.

Thanks, yes, it's looking like that's the way to go, but it won't happen
before tomorrow.

> An alternative you could consider would be to compute the cell map in an
> accumulator.

Interesting, and something else that won't happen before tomorrow.

Regards,


Tony Graham                                         tgraham@xxxxxxxxxx
Consultant                                       http://www.mentea.net
Chair, Print and Page Layout Community Group @ W3C    XML Guild member
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
Mentea       XML, XSL-FO and XSLT consulting, training and programming


Current Thread
Keywords