Re: [xsl] mixed content grouping by whitespace

Subject: Re: [xsl] mixed content grouping by whitespace
From: James Cummings <james@xxxxxxxxxxxxxxxxx>
Date: Mon, 12 Apr 2010 15:15:12 +0100
On Mon, Apr 12, 2010 at 10:58, David Carlisle <davidc@xxxxxxxxx> wrote:
>> It seems that when the solution requires a two pass one done all in
>> one stylesheet, I have difficulty getting my head around it.
> It's usually best to think of these as two completely separate
> transformations, and it helps to think about it if you serialise the
> intermediate stage using something like
>
> <xsl:message select="$variable"/>
> just after the </xsl:variable>

That is certainly a good way to see what the variable is doing.  Often
I write these two steps, it seems, as completely separate stylesheets.
 I do the first operation, and then the second operation in the next
stylesheet. This is, of course, highly inefficient but simpler for my
weak intellect to deal with... and multi-passes are easier to
understand than muenchian recursion (which took me awhile).  But I've
noticed increasingly I'm doing lots of things in a variable, then
taking a second or even a third bite at the cherry by processing that
variable again in another variable. But for someone who thinks of
themselves as a non-programmer, this is starting to sink in the more I
use it. ;-)

-James

Current Thread